mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +00:00
LibPDF: Read /Flags off font descriptors
This commit is contained in:
parent
a61f09a010
commit
207717982c
3 changed files with 23 additions and 1 deletions
|
@ -55,8 +55,14 @@ PDFErrorOr<NonnullRefPtr<PDFFont>> PDFFont::create(Document* document, NonnullRe
|
|||
return font.release_nonnull();
|
||||
}
|
||||
|
||||
PDFErrorOr<void> PDFFont::initialize(Document*, NonnullRefPtr<DictObject> const&, float)
|
||||
PDFErrorOr<void> PDFFont::initialize(Document* document, NonnullRefPtr<DictObject> const& dict, float)
|
||||
{
|
||||
if (dict->contains(CommonNames::FontDescriptor)) {
|
||||
auto descriptor = TRY(dict->get_dict(document, CommonNames::FontDescriptor));
|
||||
if (descriptor->contains(CommonNames::Flags))
|
||||
m_flags = descriptor->get_value(CommonNames::Flags).to_int();
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue