Glyph class

Glyph class

Represents a glyph

Constructors

NameDescription
Glyph(glyph_index, advance, advance_offset, ascender_offset)Initializes new instance of this class.

Properties

NameDescription
advanceAdvance width indicating placement for the subsequent glyph.
advance_offsetHorizontal (x) offset relative to glyph position. Mostly used to attach marks (like diacritics) to base characters.
ascender_offsetVertical (y) offset relative to glyph position. Mostly used to attach marks (like diacritics) to base characters.
glyph_indexIndex of the glyph (GID) in the physical font.

Methods

NameDescription
clone()Returns a clone of this instance.
get_width(em, font_size)Returns width (advance) of the glyph in points.

See Also