Interface Font
access this type via: ui.Font (provides, requires or uses)
This is an API that allows the creation of font instances for use with other graphical objects. Note that Dana comes with standard fonts within the resources-ext directory so that the programmer can rely on at least these fonts always being available. See also the SystemInfo API which reports on the default system fonts.
Functions
Font(char path[], int size)
int getSize()
char[] getSource()
FontMetrics getFontMetrics()
char[] getFontName()
bool isFixedCharacterWidth()
int getTextWidth(char text[])
PixelMap getPixels(char text[], Color textColor)
Font(char path[], int size)
Creates a new font instance, from a given font file, using a given font size.
int getSize()
Get the font size.
char[] getSource()
Get the path of the font.
FontMetrics getFontMetrics()
Get the FontMetrics of this font.
char[] getFontName()
Get the friendly name of this font.
bool isFixedCharacterWidth()
Get the character spacing affinity of the font (fixed width or variable-width).
int getTextWidth(char text[])
Get the width, in pixels, of the given text as rendered by this font.
PixelMap getPixels(char text[], Color textColor)
Get a piece of text, rendered with this font on a single line, as a bitmap.