mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-28 20:18:06 -06:00
Find and the renderer place glyphs of a simple font that has no /Widths with the embedded font program's own advances, but redaction guessed the widths from the font's name (a standard-14 face, Helvetica by default). When the guess was wider than the real font, the end of a line under a mark seemed to lie past it and was kept in the content stream, and the verify pass, using the same guess, agreed. Metrics now fills the width table from an embedded sfnt program (FontFile2, or OpenType FontFile3) when /Widths is missing, looking the glyph up as the renderer does. A subset's unmapped codes get width 0 so has_glyph stays false for them. Fonts with /Widths, and bare CFF or Type 1 programs, are unchanged. Fixes #2130