new Fonts()
Default Constructor
Provides support for loading and unloading of font image and font description
Note: font name is the path to the fnt file. (without the fnt extension!)
You must also provide the image file in the exact same folder
with the exact same name, with ".png" extension.
- Source:
Methods
(static) getCharInfo(fontName, aChar) → {CharacterInfo}
Get Character Information for a char from a font
Parameters:
Name | Type | Description |
---|---|---|
fontName |
String | Font to get information from |
aChar |
Char | Character to get information as |
- Source:
Returns:
Char information
- Type
- CharacterInfo
(static) getCharInfo(fontName, aChar) → {CharacterInfo}
Get Character Information for a char from a font
Parameters:
Name | Type | Description |
---|---|---|
fontName |
String | Font to get information from |
aChar |
Char | Character to get information as |
- Source:
Returns:
Char information
- Type
- CharacterInfo
(static) loadFont(fontName) → {void}
Load font into resource map
Parameters:
Name | Type | Description |
---|---|---|
fontName |
String |
- Source:
Returns:
- Type
- void
(static) loadFont(fontName) → {void}
Load font into resource map
Parameters:
Name | Type | Description |
---|---|---|
fontName |
String |
- Source:
Returns:
- Type
- void
(static) unloadFont(fontName) → {void}
Remove the reference to allow associated memory
be available for subsequent garbage collection
Parameters:
Name | Type | Description |
---|---|---|
fontName |
String |
- Source:
Returns:
- Type
- void
(static) unloadFont(fontName) → {void}
Remove the reference to allow associated memory
be available for subsequent garbage collection
Parameters:
Name | Type | Description |
---|---|---|
fontName |
String |
- Source:
Returns:
- Type
- void