Drag[en]gine Script Module DragonScript Script API 1.0
Immutable font resources. More...
|Normalized filename the font has been loaded from. More...|
|Point||getTextSize (String text)|
|Size of text in pixels using this font. More...|
|float||getCharWidth (int char)|
|Width of character in pixels using this font. More...|
|float||getCharAdvance (int char)|
|Advance of character in pixels using this font. More...|
|float||getCharBearing (int char)|
|Bearing of character in pixels using this font. More...|
|Font size in pixels. More...|
|Largest width in pixels of all characters supported by this font. More...|
|bool||equals (Object other)|
|Font is equal to another object. More...|
|Hash code for use as dictionary keys. More...|
|Font||new (String filename, int fontSize)|
|Load font from file. More...|
|static void||loadAsynchron (String filename, ResourceNotifier notifier)|
|Load font from file asynchronously. More...|
Immutable font resources.
This is a native class. It can not be subclassed.
Advance of character in pixels using this font.
Bearing of character in pixels using this font.
Width of character in pixels using this font.
Normalized filename the font has been loaded from.
Largest width in pixels of all characters supported by this font.
Font size in pixels.
This is also the line height of the font.
Size of text in pixels using this font.
Hash code for use as dictionary keys.
Load font from file asynchronously.
Registers a request in the game engine to load an font. Once finished or if the file is already loaded the notifier is used to deliver the loaded font or null if the loading failed.
Load font from file.
If the font file has been already loaded it is assigned to this object. If the font is not loaded yet the engine loads the font. This call blocks until the font is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded font resource. Once no object instance uses an font file anymore it is released from memory.