Skip to content

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 ​

ParameterType
assetIdstring
loader?IAssetLoader

Returns ​

Font

Inherited from ​

AssetHandle.constructor

Properties ​

PropertyModifierTypeInherited from
assetIdreadonlystringAssetHandle.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 ​

AssetHandle.isLoaded


SetDefaultAssetLoader() ​

ts
static SetDefaultAssetLoader(loader): void;

Parameters ​

ParameterType
loaderIAssetLoader | null

Returns ​

void

Inherited from ​

AssetHandle.SetDefaultAssetLoader

© 2026 PlayAdGentic