[Top][All Lists]

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

Re: [ft-devel] FreeType 2.3.5 - incorrect bitmap_left / horiBearingX val

From: Werner LEMBERG
Subject: Re: [ft-devel] FreeType 2.3.5 - incorrect bitmap_left / horiBearingX values with Symbol TT font
Date: Sat, 23 Feb 2008 08:39:46 +0100 (CET)

> 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


reply via email to

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