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

LibPDF/CFF: Compute per-glyph glyph width in CID-keyed fonts

Make TopDict's defaultWidthX and nominalWidthX Optional<>s so that
we can check if they're set per fdselect-selected font dict, and
if so use the value from there in CID-keyed fonts. Otherwise, keep
using the value in the top dict.
This commit is contained in:
Nico Weber 2024-02-15 07:44:22 -05:00 committed by Tim Flynn
parent 4348b484c6
commit 5c8778a161
2 changed files with 19 additions and 9 deletions

View file

@ -124,8 +124,8 @@ public:
int encoding_offset = 0;
int charstrings_offset = 0;
Vector<ByteBuffer> local_subroutines;
float defaultWidthX = 0;
float nominalWidthX = 0;
Optional<float> defaultWidthX;
Optional<float> nominalWidthX;
bool is_cid_keyed = false;
int fdselect_offset = 0;
int fdarray_offset = 0;