freetype
[Top][All Lists]
Advanced

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

[ft] Getting an Glyphs Bounding Box.


From: Infro
Subject: [ft] Getting an Glyphs Bounding Box.
Date: Sat, 12 Feb 2011 10:52:39 -0600

So far, I've had no trouble using FT_Glyph_Get_CBox to get the size of the glyph's bounding box, until today I had a glyph render pixels above the BBox I got. I'm curious if the following code will cure my problem or do I need to do something more, drastic?
 
if(CurrentGlyph->Glyph->format == FT_GLYPH_FORMAT_OUTLINE)
{
  FT_Outline_Get_CBox(((FT_OutlineGlyph)CurrentGlyph->Glyph)->outline, &GlyphBox);
}
else
{
  FT_Glyph_Get_CBox(CurrentGlyph->Glyph, FT_GLYPH_BBOX_PIXELS, GlyphBoxPointer);
}
 
Thanks in advanced.
Infro

reply via email to

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