font for text drawing and measuring (GUI Only) More...
Public Member Functions | |
number | getFontAscent (number size, int style=textStyle_Plain) |
get the distance from the top of the font to the baseline More... | |
number | getFontDescent (number size, int style=textStyle_Plain) |
get the distance from the baseline to the bottom of the font More... | |
number | getFontHeight (number size, int style=textStyle_Plain) |
get the total height of a line of text in this font, including spacing More... | |
number | getFontLeading (number size, int style=textStyle_Plain) |
get the distance between lines of the font More... | |
string | getFontName () |
get the name of this font More... | |
font for text drawing and measuring (GUI Only)
You cannot create fonts directly, they must be loaded by the Graphics Manager. Drawing text is done through the Port class after assigning a font. The Font object is read only, and has methods for getting measurement info (Font Metrics) for the font.
getFontAscent | ( | number | size, |
int | style = textStyle_Plain |
||
) |
get the distance from the top of the font to the baseline
size | the font size you are getting the ascent for |
style | (optional) the Font Style, defaults to textStyle_Plain if not passed |
getFontDescent | ( | number | size, |
int | style = textStyle_Plain |
||
) |
get the distance from the baseline to the bottom of the font
size | the font size you are getting the descent for |
style | (optional) the Font Style, defaults to textStyle_Plain if not passed |
getFontHeight | ( | number | size, |
int | style = textStyle_Plain |
||
) |
get the total height of a line of text in this font, including spacing
size | the font size you are getting the height for |
style | (optional) the Font Style, defaults to textStyle_Plain if not passed |
getFontLeading | ( | number | size, |
int | style = textStyle_Plain |
||
) |
get the distance between lines of the font
size | the font size you are getting the leading for |
style | (optional) the Font Style, defaults to textStyle_Plain if not passed |
getFontName | ( | ) |
get the name of this font