freetype
[Top][All Lists]
Advanced

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

Re: [ft] BBox question


From: Chia I Wu
Subject: Re: [ft] BBox question
Date: Fri, 12 Aug 2005 06:41:25 +0800
User-agent: Mutt/1.5.9i

On Thu, Aug 11, 2005 at 06:07:37PM +0200, Michele Petrazzo wrote:
> Another simple question (but I'm crazing... :) )
> I load truetype font, a face, and a character. Set size. I want to know
> its Bbox, so the width and height in pixel size.
> (with another tool I see that Arial font with 50 dimension and 96
> resolution, the size is 19 x 75)
> 
> For width, is simple: face->glyph->advanced.x / 64  = 19 (right)
> And for height? I try to translate to pixel size all the face/glyph
> dimension,( face->bbox, face->size->matrix, etc..) but I cannot find the
> "75" value.
> Can someone point me to the right direction?
After loading the glyph, use
FT_Outline_Get_CBox( &face->glyph->outline, &cbox ) to get the bounding
box of the glyph.

face->bbox is a bounding box of all glyphs of a face.
-- 
Regards,
olv




reply via email to

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