Add a test for bitmap font metrics to ensure that they match the Windows ones

Huw Davies huw at
Fri Mar 17 06:15:13 CST 2006

On Fri, Mar 17, 2006 at 02:01:41PM +0800, Dmitry Timoshkov wrote:
> "Huw D M Davies" <h.davies1 at> wrote:
> > Looks like this might be a fontforge or FreeType problem.  Windows
> > courier at 13 ppem should have an ascent of 11 and a descent of 2,
> > which is what we have in the .sfd.  Now, when I run sfnt2fnt on the
> > generated .ttf I get an ascent of 13, ppem of 13 and hence a descent
> > of 0.
> >
> > I'm not going to have time to look into this soon, so please feel free
> > to investigate more.
> Looks like it's a sfnt2fnt bug and not a fontforge or FreeType problem.
> This patch tests bitmap font metrics to ensure that they match the Windows
> ones. The patch discovers a bug in sfnt2fnt which causes Courier font to
> have wrong ascent and descent values (13/0 instead of 11/2). courier.ttf
> generated by fontforge from courier.sfd has correct values, but courier-*.fnt
> files have wrong values.

Well we get the ascent from the height of the Aring glyph.  As far as
I can tell this is 11 in fontforge.  So somewhere between fontforge's
export as a ttf and sfnt2fnt reading that ttf (using FreeType) the
value has changed to 13.  Hence my comment that either fontforge or
FreeType is doing something odd.

Huw Davies
huw at

More information about the wine-devel mailing list