[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] More FreeType PostScript problems...
From: |
Pedriana, Paul |
Subject: |
[Freetype] More FreeType PostScript problems... |
Date: |
Thu, 31 Oct 2002 21:20:34 -0800 |
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
- [Freetype] More FreeType PostScript problems...,
Pedriana, Paul <=