Class Font

Font instance with specific size, weight, face, etc.

class Font
  : RefCountedObject

Use FontManager.instance.getFont to retrieve it.

Constructors

NameDescription
this ()

Fields

TypeNameDescription
_desc Properties as detected after opening of file

1 inherited fields

Properties

TypeNameDescription
bool
antialiased[get] Returns true if antialiasing is enabled, false if not enabled
int
baseline[get] Baseline offset
family[get] Font family
bool
hasKerning[get] Does this font have kerning?
int
height[get] Actual font height including interline space
bool
isFixed[get] Returns true if font has fixed pitch (all characters have equal width)
bool
isNull[get] Returns true if font object is not yet initialized / loaded
bool
italic[get] True if the font style is italic
int
size[get] Font size (as requested from font engine)
float
spaceWidth[get] Returns width of the space character
ushort
weight[get] Font weight (100..900)

Methods

NameDescription
checkpoint () Clear usage flags for all entries
cleanup () Removes entries not used after last call of checkpoint() or cleanup()
clear () Cleanup resources
clearGlyphCache () Clears glyph cache
getCharGlyph (ch, withImage) Get character glyph information
getCharWidth (ch) Returns character width
getKerningOffset (prevChar, currentChar) Override to implement kerning offset calculation