freetypy.Glyph¶
-
class
freetypy.Glyph¶ 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.-
__init__()¶ x.__init__(...) initializes x; see help(type(x)) for signature
Methods
get_cboxGet the glyph’s ‘control box’. renderConvert a given glyph image to a Bitmap.Attributes
advanceThe transformed advance width for the glyph (in fractional pixels). bitmapGet the Bitmapfrom thisGlyphif it has been rendered.bitmap_leftThe bitmap’s left bearing expressed in integer pixels. bitmap_topThe bitmap’s top bearing expressed in integer pixels. faceThe parent face object. formatThe format of the image 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. metricsThe Glyph_Metricsof 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 subglyphsA sequence of all of the subglyphs that make up the glyph. -