Disable (additional) hinting of composites.
commitc1e2d7aa5a00da7486e6d28d45eedde04322dcca
authorWerner Lemberg <wl@gnu.org>
Tue, 14 Jun 2011 05:55:47 +0000 (14 07:55 +0200)
committerWerner Lemberg <wl@gnu.org>
Tue, 14 Jun 2011 05:55:47 +0000 (14 07:55 +0200)
tree5f1cbed18e8c01146d9bd144cc1bfb212c47769c
parent016a4cff814af50229e8d2e897b40fda4e33ede2
Disable (additional) hinting of composites.

Up to now, ttfautohint was agnostic of composites at all (as is FreeType's
autohinter normally), this is, internal calls to FT_Load_Glyph always
resolved the subglyphs to construct a simple glyph.  This normally has the
advantage that the whole glyph gets hinted at once, possibly improving the
overall shape.  However, using the normal TrueType hinting mechanism, it is
not possible to switch off hinting of single glyph components; as an effect,
each subglyph got hinted, and then the whole glyph again.  If there were no
scaling, this wouldn't do any harm (except being slower), but the autohinter
actually uses scaling...

This commit disables the creation of hints for composite glyphs (but glyph
components get hints).  At the same time, the default hinting module is set
to `latin' so that all glyphs in a font get hinted.  The offsets of glyph
components is still unscaled and thus incorrect (this will be handled by
another patch).

Another benefit is that the size of the output TTF can shrink a lot.  For
pala.ttf, it is a reduction from 493kB to 336kB.
src/tabytecode.c
src/taglobal.c