[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] Re: Really serious FT bug (was: Kerning problem with capitals

From: George Williams
Subject: [ft-devel] Re: Really serious FT bug (was: Kerning problem with capitals)
Date: 24 Jun 2005 13:15:12 -0700

On Fri, 2005-06-24 at 00:56, Werner LEMBERG wrote:
> Uh, oh, there is a serious bug in FreeType's TT code which apparently
> has gone unnoticed *for years*!  In ttgload.c, function
> `compute_glyph_metrics', you can find this:
>   /* translate array so that (0,0) is the glyph's origin */
>   FT_Outline_Translate( &glyph->outline, -loader->pp1.x, 0 );
> I think this is wrong.
> According to the docs, we have
>   pp1 = xMin - lsb
>   pp2 = pp1 + aw
> Most fonts have xMin = lsb so that pp1 is zero normally.  The gotyk
> font has
>     xMin = 188
>     lsb   = 28
> which means that the whole outline is shifted, causing wrong results.
Um, I wouldn't leap to that conclusion. There is some very weird stuff
in the ttf spec regarding the difference between min & lsb (which I
never understood).  And shifting phantom point one around is a way of
translating the entire glyph.

I wouldn't be surprised if this weren't correct behavior. ff does not
look at that level of tt behavior so my analysis missed all that.

The font has really weird metrics. I'd tend to trust David's code rather
than it...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]