Class: Font
Typed wrapper for a loaded font. By convention the asset id IS the CSS family name (loading 'PressStart2P' registers
Font-face
family 'PressStart2P'). data is the FontFace for TTF/OTF or the BitmapFont instance for bitmap fonts.
Extends
Constructors
Constructor
ts
new Font(assetId, loader?): Font;Parameters
| Parameter | Type |
|---|---|
assetId | string |
loader? | IAssetLoader |
Returns
Font
Inherited from
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
assetId | readonly | string | AssetHandle.assetId |
Accessors
data
Get Signature
ts
get data(): unknown;Returns
unknown
fontFamily
Get Signature
ts
get fontFamily(): string;Returns
string
Methods
GetDefaultAssetLoader()
ts
static GetDefaultAssetLoader(): IAssetLoader | null;Returns
IAssetLoader | null
Inherited from
AssetHandle.GetDefaultAssetLoader
isLoaded()
ts
isLoaded(): boolean;Returns
boolean
Inherited from
SetDefaultAssetLoader()
ts
static SetDefaultAssetLoader(loader): void;Parameters
| Parameter | Type |
|---|---|
loader | IAssetLoader | null |
Returns
void