pixi.js
    Preparing search index...

    Variable loadWebFontConst Advanced

    loadWebFont: {
        extension: { priority: LoaderParserPriority; type: LoadParser };
        id: string;
        name: string;
        load(
            url: string,
            options?: ResolvedAsset<LoadFontData>,
        ): Promise<FontFace | FontFace[]>;
        test(url: string): boolean;
        unload(font: FontFace | FontFace[]): void;
    } = ...

    A loader plugin for handling web fonts

    The asset alias identifies the font in Assets; it is not the CSS font family. Use the data.family value (or the loaded FontFace.family) as the fontFamily in a text style. Without data.family, the family is derived from the font file name.

    Type Declaration

    import { Assets, Text } from 'pixi.js';

    await Assets.load({
    alias: 'font',
    src: 'fonts/titan-one.woff',
    data: { family: 'Titan One' },
    });

    const text = new Text({ text: 'Hello', style: { fontFamily: 'Titan One' } });