[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] BDF and FT_Set_Pixel_Sizes
From: |
Chia-I Wu |
Subject: |
Re: [ft-devel] BDF and FT_Set_Pixel_Sizes |
Date: |
Tue, 6 Dec 2005 14:50:25 +0800 |
User-agent: |
Mutt/1.5.11 |
On Sat, Dec 03, 2005 at 04:15:09PM +0800, Chia-I Wu wrote:
> 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.
Any comment?
I found this mail
http://lists.gnu.org/archive/html/freetype-devel/2004-07/msg00011.html
and BDF_Set_Pixel_Sizes was changed because otherwise
FTC_Manager_LookupSize would return error if we set
scaler.width = face->available_sizes->width;
scaler.height = face->available_sizes->height;
scaler.pixel = TRUE;
But shouldn't the scaler be set up like this:
scaler.width = face->available_sizes->x_ppem;
scaler.height = face->available_sizes->y_ppem;
scaler.pixel = TRUE;
?
> 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 ):
> }
>
> ?
(More looking forward to comments on this question actually)
--
Regards,
olv