1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:07:46 +00:00

LibPDF: Make CFF::parse_charset() return SIDs

...and do string expansion at the call site.

CID-keyed fonts treat the charset as CIDs instead of as SIDs,
so having access to the SIDs in numberic form will be useful
when we implement support for CID-keyed CFF fonts.

No behavior change.
This commit is contained in:
Nico Weber 2024-02-05 21:30:45 -05:00 committed by Andreas Kling
parent 9750261921
commit 9bccb8c8d7
2 changed files with 11 additions and 8 deletions

View file

@ -97,7 +97,7 @@ public:
static PDFErrorOr<Vector<CFF::Glyph>> parse_charstrings(Reader&&, Vector<ByteBuffer> const& local_subroutines, Vector<ByteBuffer> const& global_subroutines);
static DeprecatedFlyString resolve_sid(SID, Vector<StringView> const&);
static PDFErrorOr<Vector<DeprecatedFlyString>> parse_charset(Reader&&, size_t, Vector<StringView> const&);
static PDFErrorOr<Vector<SID>> parse_charset(Reader&&, size_t);
static PDFErrorOr<Vector<u8>> parse_encoding(Reader&&, HashMap<Card8, SID>& supplemental);
};