FontSource
Implements
- Loadable<FontFace>
Index
Constructors
constructor
Parameters
path: string
Path to the font resource relative from the HTML document hosting the game, or absolute
family: string
The font family name
__namedParameters: FontSourceOptions = {}
Returns FontSource
Properties
data
Data associated with a loadable
publicreadonlyfamily
The font family name
publicreadonlypath
Path to the font resource relative from the HTML document hosting the game, or absolute
Methods
isLoaded
Returns true if the loadable is loaded
Returns boolean
load
Begins loading the resource and returns a promise to be resolved on completion
Returns Promise<FontFace>
toFont
Build a font from this FontSource.
Parameters
optionaloptions: FontOptions & GraphicOptions & RasterOptions
{FontOptions} Override the font options
Returns Font
An interface describing loadable resources in Excalibur. Built-in loadable resources include Texture, Sound, and a generic Resource.