freetype-devel
[Top][All Lists]
Advanced

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

[Devel] regression with underline position for type 1 fonts


From: Ian Brown
Subject: [Devel] regression with underline position for type 1 fonts
Date: Thu, 27 May 2004 18:27:57 +0200

I've recently changed from freetype 2.1.4 to 2.1.5 on my unix systems (yeah, I know it is an old version but we use the cache code in strange ways and so upgrading can be painful).
After the upgrade, the underline position and widths for type 1 fonts are wrong.
 
I dug into the code a bit (up to 2.1.7) and I don't really see how the new code can work....
 
in t1objs.c we have:
 
      root->underline_position  = info->underline_position >> 16;
      root->underline_thickness = info->underline_thickness >> 16;
(previously the >> 16 was not there ... this is what has changed).
 
now, info is a PS_FontInfoRec, and underline_position and thickness are defined as 16 bit values (see below). Thus, the >> 16 is basically going to result in a value of 0xFFFF or 0x0000.
 
I don't know why the >> 16 was added, but I cannot see how it can be correct.
 
  typedef struct  PS_FontInfoRec
  {
    FT_String*  version;
    FT_String*  notice;
    FT_String*  full_name;
    FT_String*  family_name;
    FT_String*  weight;
    FT_Long     italic_angle;
    FT_Bool     is_fixed_pitch;
    FT_Short    underline_position;
    FT_UShort   underline_thickness;
 
  } PS_FontInfoRec, *PS_FontInfo;
 
Ian
 
Ian Brown
PrintSoft Systems GmbH
 
 
 

reply via email to

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