freetypy.Glyph¶
-
class
freetypy.
Glyph
¶ 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
.-
__init__
()¶ x.__init__(...) initializes x; see help(type(x)) for signature
Methods
get_cbox
Get the glyph’s ‘control box’. render
Convert a given glyph image to a Bitmap
.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
The bitmap’s left bearing expressed in integer pixels. bitmap_top
The bitmap’s top bearing expressed in integer pixels. face
The parent face object. format
The format of the image 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. metrics
The Glyph_Metrics
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 subglyphs
A sequence of all of the subglyphs that make up the glyph. -