|
From: | Bevan, David |
Subject: | RE: [ft-devel] FreeType 2.3.5 - incorrect bitmap_left / horiBearingX values with Symbol TT font |
Date: | Mon, 25 Feb 2008 10:39:27 -0000 |
Werner, Is there any harm in
making the following change in TT_Load_Glyph() Replace if ( ( face->header.Flags & 2 ) == 0
&& loader.pp1.x )
FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 ); with if ( loader.pp1.x )
FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 ); in order to accommodate bad
fonts like this? Or does this have some
unwanted side-effect? David %^> > -----Original Message----- > From: Werner LEMBERG [mailto:address@hidden > Sent: 23 February 2008 07:40 > To: Bevan, David > Cc: address@hidden; Brazier, Stephen; Ghoshal, Ronen; Nagpal, > Shipra > Subject: Re: [ft-devel] FreeType 2.3.5 - incorrect bitmap_left / > horiBearingX values with Symbol TT font > > > We've just upgraded from FreeType 2.1.9 to 2.3.5 and encountered a > > regression issue. > > > > With the attached Symbol TT font, the "left side-bearing" values are > > incorrect for some of the characters. > > > > For many characters, both the bitmap_left and horiBearingX values > > are now zero. Some others are incorrectly too large. > > > > The first character to show the problem is glyph 3, the '!' > > character. > > > > For this character (16pt at 300dpi), with 2.1.9, horiBearingX was > > 448. With 2.3.5 it is now incorrectly zero. Similarly, bitmap_left > > was 7 and is now also zero. > > This isn't a bug in FreeType 2.3.5 but a bug in the font itself. > > To cite the OpenType specification, documenting the `glyf' table: > > The scaler will perform better if the glyph coordinates have been > created such that the xMin is equal to the lsb. For example, if the > lsb is 123, then xMin for the glyph should be 123. If the lsb is -12 > then the xMin should be -12. If the lsb is 0 then xMin is 0. If > all glyphs are done like this, set bit 1 of flags field in the > 'head' table. > > However, in your Symbol.ttf (which is version 1.00), this bit in the > `head' table is incorrectly set to 1, indicating that the left side > bearing values in the `hmtx' table can be ignored because those > offsets are already applied to the coordinates in the `glyf' table. > > Later versions of Symbol.ttf (e.g. version 1.60 which I have) have > this bit cleared, and FreeType 2.3.5 correctly honours it (while 2.1.9 > doesn't). > > > Werner |
[Prev in Thread] | Current Thread | [Next in Thread] |