freetypy.Glyph¶
-
class
freetypy.
Glyph
¶ Contains information pertaining to a single glyph.
Notes
If
Face.load_glyph
is 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
advance
The transformed advance width for the glyph (in fractional pixels). bitmap
Get the Bitmap
from thisGlyph
if it has been rendered.bitmap_left
This is the bitmap’s left bearing expressed in integer pixels. bitmap_top
This is the bitmap’s top bearing expressed in integer pixels. face
The parent face object. format
This field indicates the format of the image contained in the glyph slot. linear_hori_advance
The advance width of the unhinted glyph. linear_vert_advance
The advance height of the unhinted glyph. lsb_delta
The difference between hinted and unhinted left side bearing while autohinting is active. metrics
The GlyphMetrics
of the glyph.outline
The outline descriptor for the current glyph image if its format is GLYPH_FORMAT.OUTLINE
.rsb_delta
The difference between hinted and unhinted right side bearing while autohinting is active. subglyphs
A sequence of all of the subglyphs that make up the glyph. Methods
get_cbox
Return a glyph’s ‘control box’. render
Convert a given glyph image to a Bitmap
.