[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Really serious FT bug (was: Kerning problem with capitals)
From: |
Werner LEMBERG |
Subject: |
[ft-devel] Really serious FT bug (was: Kerning problem with capitals) |
Date: |
Fri, 24 Jun 2005 09:56:27 +0200 (CEST) |
George, thanks a lot for your help.
> So ftstring gives the distance between d & o as more than the
> counter, while the splines & ff's metricsview suggest it should be
> about half the counter.
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.
If you comment out this line, the results are fine.
David?
Werner