pixi-jsVariables
Variable: loadWebFont
> const loadWebFont: object
Defined in: node_modules/pixi.js/lib/assets/loader/parsers/loadWebFont.d.ts:67
A loader plugin for handling web fonts
Type Declaration
extension
> extension: object
extension.priority
> priority: LoaderParserPriority
extension.type
> type: LoadParser
id
> id: string
name
> name: string
used for deprecation purposes
load()
> load<T>(url, options?): Promise<FontFace | FontFace[]>
Type Parameters
T
T
Parameters
url
string
options?
Returns
Promise<FontFace | FontFace[]>
test()
> test(url): boolean
Parameters
url
string
Returns
boolean
unload()
> unload(font): void
Parameters
font
FontFace | FontFace[]
Returns
void
Example
import { Assets } from 'pixi.js';
Assets.load({
alias: 'font',
src: 'fonts/titan-one.woff',
data: {
family: 'Titan One',
weights: ['normal', 'bold'],
}
})