freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Really serious FT bug


From: Werner LEMBERG
Subject: Re: [ft-devel] Really serious FT bug
Date: Sat, 20 Aug 2005 15:47:14 +0200 (CEST)

From: Rogier van Dalen <address@hidden>
Date: Fri, 1 Jul 2005 09:17:44 +0200

> On 6/24/05, Werner LEMBERG <address@hidden> 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.
>
> FWIW: someone reported a similar problem in my TrueType loading
> code, for another font. I was not sure this was due to a bug in my
> code.  My guess was, though I have not yet had the time to check it,
> that the font set bit 2 of "flags" in the "head" table, which
> according to http://www.microsoft.com/typography/otspec/head.htm
> means "Left sidebearing point at x=0". This might lead an
> unsuspecting operating system to mask a bug in the font.

Indeed, the font in question (Gotyk3.ttf) has the `left sidebearing
point at x=0' bit set; with other words, the font is buggy.

What do you think of translating only if this bit in the `head' table
is set?  Currently, FreeType ignores it, but it seems that Windows
uses it.  Rogier, how do you handle this your engine?


    Werner




reply via email to

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