1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

LibPDF: Sink m_base_font_name from PDFFont into subclasses

/BaseFont is a required key for type 0, type 1, and truetype
font dictionaries, but not for type 3 font dictionaries.

This is mechanical; type 0 fonts don't even use this yet
(but probably should).

PDFFont::initialize() is now empty and could be removed,
but maybe we'll put stuff there again later, so I'm leaving
it around for a bit longer.
This commit is contained in:
Nico Weber 2023-11-14 08:37:53 -05:00 committed by Sam Atkins
parent 6c1da5db54
commit 7f999b1ff5
8 changed files with 16 additions and 7 deletions

View file

@ -54,9 +54,8 @@ PDFErrorOr<NonnullRefPtr<PDFFont>> PDFFont::create(Document* document, NonnullRe
return font.release_nonnull();
}
PDFErrorOr<void> PDFFont::initialize(Document* document, NonnullRefPtr<DictObject> const& dict, float)
PDFErrorOr<void> PDFFont::initialize(Document*, NonnullRefPtr<DictObject> const&, float)
{
m_base_font_name = TRY(dict->get_name(document, CommonNames::BaseFont))->name();
return {};
}