|
TorqueScript Reference
|
Functions | |
| void | dumpFontCacheStatus () |
| void | duplicateCachedFont (oldFontName, oldFontSize, newFontName) |
| void | exportCachedFont (fontName, size, fileName, padding, kerning) |
| void | importCachedFont (fontName, size, fileName, padding, kerning) |
| void | populateAllFontCacheRange (rangeStart, rangeEnd) |
| void | populateAllFontCacheString (string inString) |
| void | populateFontCacheRange (faceName, size, rangeStart, rangeEnd) |
| void | populateFontCacheString (faceName, size, string) |
| void | writeFontCache () |
| void dumpFontCacheStatus | ( | ) |
Dump a full description of all cached fonts, along with info on the codepoints each contains.
| void duplicateCachedFont | ( | oldFontName | , |
| oldFontSize | , | ||
| newFontName | |||
| ) |
Copy the specified old font to a new name. The new copy will not have a platform font backing it, and so will never have characters added to it. But this is useful for making copies of fonts to add postprocessing effects to via exportCachedFont.
| oldFontName | The original font. |
| oldFontSize | The original font's size property. |
| newFontName | The name to set the copy to. |
| void exportCachedFont | ( | fontName | , |
| size | , | ||
| fileName | , | ||
| padding | , | ||
| kerning | |||
| ) |
Export specified font to the specified filename as a PNG. The image can then be processed in Photoshop or another tool and reimported using importCachedFont. Characters in the font are exported as one long strip.
| fontName | The name of the font to export. |
| size | The size of the font |
| fileName | The export file name. |
| padding | Desired padding settings. |
| kerning | Kerning settings (space between elements) |
| void importCachedFont | ( | fontName | , |
| size | , | ||
| fileName | , | ||
| padding | , | ||
| kerning | |||
| ) |
Import an image strip from exportCachedFont. Call with the same parameters you called exportCachedFont.
| fontName | The name of the font to import. |
| size | The size of the font |
| fileName | The imported file name. |
| padding | Desired padding settings. |
| kerning | Kerning settings (space between elements) |
| void populateAllFontCacheRange | ( | rangeStart | , |
| rangeEnd | |||
| ) |
Populate the font cache for all fonts with Unicode code points in the specified range. Note we only support BMP-0, so code points range from 0 to 65535.
| rangeStart,rangeEnd | The range of the unicode points to populate caches with |
| void populateAllFontCacheString | ( | string | inString | ) |
Populate the font cache for all fonts with characters from the specified string.
| inString | The string to use to set the font caches |
| void populateFontCacheRange | ( | faceName | , |
| size | , | ||
| rangeStart | , | ||
| rangeEnd | |||
| ) |
Populate the font cache for the specified font with Unicode code points in the specified range. Note we only support BMP-0, so code points range from 0 to 65535.
| faceName | The name of the font |
| size | The size of the font. |
| rangeStart | The initial Unicode point |
| rangeEnd | The final Unicode point in range |
| void populateFontCacheString | ( | faceName | , |
| size | , | ||
| string | |||
| ) |
Populate the font cache for the specified font with characters from the specified string.
| faceName | The font's name |
| size | The size of the font. |
| string | The string to use to fill font cache |
| void writeFontCache | ( | ) |
force all cached fonts to serialize themselves to the cache.
1.8.10