Function createFontAssetManager

  • pathMapからkey型指定済みのAssetManagerを返す

    Returns

    AssetManager

    Type Parameters

    • T extends Record<string, string>

    Parameters

    • pathMap: T
    • keyPrefix: string = ""

      登録キーにプレフィックスをつける ローカルインストール済みの同名フォントと区別したいときに利用

    Returns {
        get(key: keyof T): FontFace;
        load(key: keyof T): Promise<FontFace>;
        loadAll(): Promise<FontFace[]>;
    }

    • get:function
      • Get fontface data Error will be thrown if specified font is not loaded

        Returns

        Parameters

        • key: keyof T

        Returns FontFace

    • load:function
      • FontFaceロードを行う すでにロード済みならキャッシュしたものを返す

        Returns

        Promise

        Parameters

        • key: keyof T

        Returns Promise<FontFace>

    • loadAll:function
      • 全ての登録アセットをロードする

        Returns

        Promise

        Returns Promise<FontFace[]>

Generated using TypeDoc