[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] discussion of truetype glyph loading code
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] discussion of truetype glyph loading code |
Date: |
Tue, 09 Aug 2005 07:50:41 +0200 (CEST) |
Sorry for the late response.
> The original code translates the points so that the origin (pp1) has
> integral coordinates and rounds pp2 and pp4, before hinting. I
> think the translation is not necessary. When bytecode interpreter
> is enabled, we move points relative to reference point or to itself.
> Thus the translation has no effect. When disabled, the translation
> doesn't help make other points having integral coordinates.
>
> And for rounding pp2 and pp4, doesn't it make the result of hinting
> inaccurate? Plus, pp2 and pp4 are rounded when calculating metrics
> later.
Whether this improves the rendering process can only be decided in
direct comparison with the Windows hinting engine. Whether it becomes
worse is hopefully visible immediately...
> ==================================================================
> @@ -1479,7 +1465,7 @@
> int n = c > d ? c : d;
>
>
> - if ( a - b <= 33 && a - b >= -33 )
> + if ( a - c <= 33 && a - c >= -33 )
> m *= 2;
> if ( c - d <= 33 && c - d >= -33 )
> n *= 2;
> ==================================================================
>
> This snippet is in deciding the mac scale of component offsets. It
> is commented out because the result is bad. But in this page
> http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html, the
> algorithm described is slightly different (typo?) from what we use
> here.
I have no idea whether this makes any difference. George?
Werner
Re: [ft-devel] discussion of truetype glyph loading code,
Werner LEMBERG <=