Logo Search packages:      
Sourcecode: pango-graphite version File versions  Download package

void gr::FreetypeFont::getGlyphPoint ( gid16  gid,
unsigned int  pointNum,
gr::Point &  xyReturn 
) [virtual, inherited]

Converts the point number of a glyph’s on-curve point to a pair of x/y coordinates in pixels. The default implementation will read the curve information directly from the font and perform a simple transformation to pixels. Some subclasses (e.g., WinFont) will use a system-level API call to return hinted metrics. Note that the coordinates returned are floating point values, using a special floating-point point class.

Parameters:
gid glyph id
pointNum within glyph
xyReturn reference to a Point object to hold the x,y result

Definition at line 138 of file FreetypeFont.cpp.

{
  // this isn't used very often, so don't bother caching
   ;

   FT_Load_Glyph(m_ftFace, gid, 0);
   const FT_Outline &outline = m_ftFace->glyph->outline;
   xyReturn.x = fix26_6(outline.points[pointNum].x);
   xyReturn.y = fix26_6(outline.points[pointNum].y);
}


Generated by  Doxygen 1.6.0   Back to index