[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] CFF glyph height doubles with autohinting
From: |
Werner LEMBERG |
Subject: |
Re: [ft] CFF glyph height doubles with autohinting |
Date: |
Fri, 24 Jan 2014 08:01:01 +0100 (CET) |
> If I run "ftview 16 f1.cff", and then toggle autohinting on with the
> 'f' key, the glyphs get taller. Actually it doesn't seem to be 2x
> -- closer to 1.5x taller.
>
> I believe the shorter height is correct. I.e., the Adobe CFF engine
> is getting it right, and the autohinter is getting it wrong.
The font is cheating: It incorrectly uses names like `A' or `p' for
glyphs that are mathematical symbols. Consequently, the auto-hinter
believes that those glyphs are Latin characters and uses them to
construct blue zones. In particular, it distorts the x height to
align it to the grid.
For example, at 38ppem, the ridiculously small x height (40 font
units, with an EM size of 1000)[*] corresponds to 1.52px, which gets
aligned to the grid at 2px. This changes the vertical scaling from
2.4320 to 3.2092 (by 31%). For a Latin font, this overall change of
glyph heights would be fully acceptable. For this math font, the
results are a disaster.
As mentioned in the very beginning: The font reports incorrect glyph
names. However, the auto-hinter *must* trust this data to derive
global hints. I don't know a solution that reliably catches such a
situation.
Werner
[*] Based on the glyphs `r' and `s', which are radical symbols. Note
that all glyphs in this math font have heights just slightly
larger than zero, but large depths.