[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] a hidden gem: the autohint warper code
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] a hidden gem: the autohint warper code |
Date: |
Tue, 01 Mar 2011 09:02:58 +0100 (CET) |
>> If the bottom line of the warped glyph is shifted away from a
>> bluezone, then the whole glyph should be shifted back a whole
>> 1 pixel back toward the bluezone after being warped.
>
> This won't work. If you shift one pixel back, all other optimized
> zones, would be at the wrong position. Warping, as it is currently
> implemented, only works if the code has the absolute freedom to
> positions stems at any places.
To be more precise: The autohinter doesn't scale glyphs uniformly in
the main hinting direction. Instead, it works similar to the TrueType
bytecode hinter: The glyph's local and global main features are
aligned to the pixel grid (as much as possible), then the remaining
points are scaled relatively to the already aligned features. I think
this is the optimum you can achieve. What is improvable, however, is
the algorithm to decide which stems are `main features', and which
features (e.g. serifs) must be handled specially. In particular,
handling of diagonal stems might be improved.
Werner
Re: [ft-devel] a hidden gem: the autohint warper code, Werner LEMBERG, 2011/03/02