[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Improved auto-hinter algorithm
From: |
Werner LEMBERG |
Subject: |
[ft-devel] Improved auto-hinter algorithm |
Date: |
Sat, 12 Apr 2014 20:54:14 +0200 (CEST) |
Folks,
I've just improved the recognition of strong points in the
auto-hinter. From the ChangeLog file:
[autofit] Redesign the recognition algorithm of strong points.
In particular, local extrema without horizontal or vertical segments
are better recognized:
+ A + D
\ /
\ /
\ /
\ /
\ + C
\ /
B +/
If the distances AB and CD are large, point B wasn't previously
detected as an extremum since the `ft_corner_is_flat' function
`swallowed' BC regardless of its direction, tagging point B as weak.
The next iteration started at B and made `ft_corner_is_flat' swallow
point C, tagging it as weak also, et voilĂ .
To improve that, another pass gets now performed before calling
`ft_corner_is_flat' to improve the `topology' of an outline: A
sequence of non-horizontal or non-vertical vectors that point into
the same quadrant are handled as a single, large vector.
Additionally, distances of near points are now accumulated, which
makes the auto-hinter handle them as if they were prepended to the
next non-near vector.
This generally improves the auto-hinter's rendering results.
Please test! Note that the same change has been applied to
ttfautohint also; attached are two images that demonstrate the
expected improvements for some fonts.
Werner
- [ft-devel] Improved auto-hinter algorithm,
Werner LEMBERG <=