freetype
[Top][All Lists]
Advanced

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

RE: [Freetype] More FreeType PostScript problems...


From: Aaron Isaksen
Subject: RE: [Freetype] More FreeType PostScript problems...
Date: Fri, 1 Nov 2002 10:02:34 -0500

I've found that using the "Recalculate" buttons in the font properties metrics section fixes this sort of problem for me.
 
-Aaron
-----Original Message-----
From: Pedriana, Paul [mailto:address@hidden
Sent: Friday, November 01, 2002 12:21 AM
To: address@hidden
Subject: [Freetype] More FreeType PostScript problems...

I have a PostScript font generated by FontLab which looks fine drawn by
Windows, but yields screwy values with FreeType 2.0. I call the code below
and get (overly small) results like this:
    yMax      =  7
    yMin      = -3
    height    = 13
    ascender  =  7
    descender = -3
 
And then the font bitmaps end up being much larger than the above and
the text overwrites itself vertically when drawn in a multi-line text display.
This same font generated as TrueType has no problems. Am I missing
something or is Freetype 2.0 confused about how to calculate PostScript
bbox data?
 
Here is the code I execute:  
   FT_Set_Pixel_Sizes(pFreeTypeData->face, 34, 34);
 
   const int yMaxEM               = pFreeTypeData->face->bbox.yMax;
  const int yMaxFixedPoint26_6   = FT_MulFix(yMaxEM, pFreeTypeData->face->size->metrics.y_scale);
    const int yMax                 = yMaxFixedPoint26_6 / 64;
 
   const int yMinEM               = pFreeTypeData->face->bbox.yMin;
   const int yMinFixedPoint26_6   = FT_MulFix(yMinEM, pFreeTypeData->face->size->metrics.y_scale);
   const int yMin                 = yMinFixedPoint26_6 / 64;
 
   const int heightEM             = pFreeTypeData->face->height;
   const int heightFixedPoint26_6 = FT_MulFix(heightEM, pFreeTypeData->face->size->metrics.y_scale);
   const int height               = heightFixedPoint26_6/64;
 
   const int ascenderEM           = pFreeTypeData->face->ascender;
   const int ascender26_6         = FT_MulFix(ascenderEM, pFreeTypeData->face->size->metrics.y_scale);
   const int ascender             = ascender26_6/64;
 
   const int descenderEM          = pFreeTypeData->face->descender;
   const int descender26_6        = FT_MulFix(descenderEM, pFreeTypeData->face->size->metrics.y_scale);
   const int descender            = descender26_6/64;
Paul
 
 
 
 
 
 
 
 
 

reply via email to

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