freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] BDF and FT_Set_Pixel_Sizes


From: Chia-I Wu
Subject: [ft-devel] BDF and FT_Set_Pixel_Sizes
Date: Sat, 3 Dec 2005 16:15:09 +0800
User-agent: Mutt/1.5.11

Hi,

According to the document,

<quote>
This means that setting the pixel size to, say, 8x8 doesn't guarantee in
any way that you get glyph bitmaps that all fit within an 8x8 cell
(sometimes even far from it).

...

For BDF and PCF formats, this function uses the sum of the `FONT_ASCENT'
and `FONT_DESCENT' properties of the bitmap font.
</quote>

I find these two paragraphs conflicting.  If we use the sum of
FONT_ASCENT and FONT_DESCENT to match against, then all glyphs are
within the 8x8 cell, provided FT_Set_Pixel_Size( face, 8, 8 ) returns
success.  Or put it in another way, it means when the face is scalable,
we should set
        x_scale = 8 / ( face->bbox.xMax - faec->bbox.xMin ),
        y_scale = 8 / ( face->bbox.yMax - faec->bbox.yMin ),
so that all glyphs are within the 8x8 cell.  And this is really not
intuitive.

I also have a (maybe stupid) question.  Why don't we simply have

FT_Set_Pixel_Sizes( face, w, h )
{
        FT_Set_Char_Size( face, w, h, 72, 72 ):
}

?

-- 
Regards,
olv




reply via email to

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