Inconsistent TrueType font bounding boxes in exported PDFs causing glyph rendering problems in Harlequin RIP
I'm investigating a font rendering issue involving PDFs exported from Adobe InDesign.
When processing certain PDFs in Harlequin RIP (through CloudFlow v23.9), some glyphs are rendered incorrectly. Parts of individual characters, particularly certain strokes and character legs, appear distorted or have incorrect dimensions.
While investigating the embedded TrueType fonts, I discovered inconsistencies between the global font bounding box in the head table and the actual bounding boxes of individual glyphs.
If I extract the font and recalculate the bounding box for the head table (global bounding box), based on all the individual glyph outlines and then insert it again into the pdf, this rendering issue goes away.
One commonality for almost every font with rendering issues is that the font name indicates that ts is a variable font, but in reality it is not, since it lacks the fvar table. I guess InDesign makes a static font out of the user adjustments made on the variable font.
An example of a glyph that renders incorrectly (also V, A, Ä, O & H):
format: PDF 1.4
creator: Adobe InDesign 19.5 (Windows)
producer: Adobe PDF Library 17.0
creationDate: D:20241022093944+02'00'
modDate: D:20241022103805+02'00'
fontname: WNHVCL+AllotropeVariable-CompressedThin
fontformat: ttf
fonttype: TrueType
variable: False (no fvar table)
globalbbox: (-50, -279, 482, 950)
globalhinting: False
glyphname: M
globalhinting: False
advancewidth: 691
numberofcontours: 1
globalbbox: (-50, -279, 482, 950)
storedbbox: (52, 0, 346, 668)
calculatedbbox: (51, 0, 640, 668)
composite: False
leftoverflow: 0
rightoverflow: 158
bottomoverflow: 0
top_overflow: 0
I've seen this inconsistency with pdf's created with:
creator: Adobe InDesign 18.5 (Windows)
creator: Adobe InDesign 19.5 (Windows)
creator: Adobe InDesign 19.5 (Macintosh)
creator: Adobe InDesign 20.2 (Macintosh)
creator: Adobe InDesign 20.5 (Windows)
creator: Adobe InDesign 21.1 (Macintosh)
creator: Adobe InDesign 21.2 (Windows)
producer: Adobe PDF Library 17.0
producer: Adobe PDF Library 18.0