#include <FontAsset_ScriptBinding.h>
Inherits AssetBase.
◆ getBaseline()
Gets the distance from the top of a line to the baseline, in pixels.
- Returns
- Returns the baseline.
◆ getFontFile()
Gets the Font file.
- Returns
- Returns the Font file.
◆ getFontSize()
Gets the size the font was generated at, in pixels.
- Returns
- Returns the native font size.
◆ getGlyphCount()
Gets the number of glyphs the font holds.
- Returns
- Returns the glyph count, or zero if the font did not load.
◆ getLineHeight()
Gets the distance between baselines, in pixels.
- Returns
- Returns the line height.
◆ getLoadedPageCount()
Gets the number of declared pages whose image actually loaded. Fewer than getPageCount() means a page image named inside the .fnt file is missing.
- Returns
- Returns the loaded page count.
◆ getPageCount()
Gets the number of texture pages the font declares.
- Returns
- Returns the page count.
◆ getPageFile()
| String getPageFile |
( |
int | pageIndex | ) |
|
Gets the image file for a page, as named inside the .fnt file.
- Parameters
-
| pageIndex | The zero-based page index. |
- Returns
- Returns the page image file, or an empty string if there is no such page.
◆ getPageHeight()
| Integer getPageHeight |
( |
int | pageIndex | ) |
|
Gets the height of a page's loaded texture, in pixels.
- Parameters
-
| pageIndex | The zero-based page index. |
- Returns
- Returns the page height, or zero if the page did not load.
◆ getPageWidth()
| Integer getPageWidth |
( |
int | pageIndex | ) |
|
Gets the width of a page's loaded texture, in pixels.
- Parameters
-
| pageIndex | The zero-based page index. |
- Returns
- Returns the page width, or zero if the page did not load.
◆ getRelativeFontFile()
| String getRelativeFontFile |
( |
| ) |
|
Gets the Font file as a path relative to the asset file.
- Returns
- Returns the Font file relative to the asset file.
◆ setFontFile()
| void setFontFile |
( |
FontFile | | ) |
|
Sets the Font file.
- Returns
- No return value.