freetypy.Glyph¶
-
class
freetypy.Glyph¶ Contains information pertaining to a single glyph.
Notes
If
Face.load_glyphis called with default flags (seeLOAD.DEFAULT) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type 1 formats).This image can later be converted into a bitmap by calling
Glyph.render.Attributes
advanceThe transformed advance width for the glyph (in fractional pixels). bitmapGet the Bitmapfrom thisGlyphif it has been rendered.bitmap_leftThis is the bitmap’s left bearing expressed in integer pixels. bitmap_topThis is the bitmap’s top bearing expressed in integer pixels. faceThe parent face object. formatThis field indicates the format of the image contained in the glyph slot. linear_hori_advanceThe advance width of the unhinted glyph. linear_vert_advanceThe advance height of the unhinted glyph. lsb_deltaThe difference between hinted and unhinted left side bearing while autohinting is active. metricsThe GlyphMetricsof the glyph.outlineThe outline descriptor for the current glyph image if its format is GLYPH_FORMAT.OUTLINE.rsb_deltaThe difference between hinted and unhinted right side bearing while autohinting is active. subglyphsA sequence of all of the subglyphs that make up the glyph. Methods
get_cboxReturn a glyph’s ‘control box’. renderConvert a given glyph image to a Bitmap.