freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFF font with bogus hint


From: Derek B. Noonburg
Subject: CFF font with bogus hint
Date: Mon, 12 Sep 2022 16:13:36 -0700

I encountered a CFF font that caused problems when rendering a PDF file
in Xpdf.  I'm not 100% certain, but it looks like the problem is an
hstem operator with a bogus (very large) y value.  That appears to be
causing FreeType to return a tall bitmap with an incorrect bitmap_top
value.

I'm attaching f2.cff.  To reproduce the problem, run "ftview 24 f2.cff"
and look at the i, j, and fi glyphs.  If you resize the ftview window
~4x taller, you'll see that the glyphs show up much lower than expected.

(I manually edited the font file and modified the hstem y value to 0
for the 'i' glyph, and that fixed the problem, at least visually in
ftview.)

Maybe better to simply ignore hints that are outside the FontBBox?  In
any case, I think the bitmap_top value needs to be fixed, so that the
origin is in the right place.

I'm running FreeType 2.12.1.

- Derek

Attachment: f2.cff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]