1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:57:44 +00:00

LibPDF/CFF: Read font dicts pointed to by the fdarray offset

The fdselect array (that we already read) maps eachs glyph ID
to an fdarray index. The font dict at that index then stores
information for that glyph.

In practice, this is used to assign different defaultWidthX /
nominalWidthX values to blocks of glyphs in CID-keyed fonts.

We don't do anything yet with the data, and we also don't send
data of CID-keyed CFFs into this parser either, so no behavior
change.
This commit is contained in:
Nico Weber 2024-02-14 07:58:05 -05:00 committed by Andreas Kling
parent 524a4f6256
commit bb7d29d007
2 changed files with 12 additions and 1 deletions

View file

@ -127,6 +127,7 @@ public:
float defaultWidthX = 0;
float nominalWidthX = 0;
int fdselect_offset = 0;
int fdarray_offset = 0;
};
static PDFErrorOr<Vector<TopDict>> parse_top_dicts(Reader&, ReadonlyBytes const& cff_bytes);