UNPKG

@tolokoban/tgd

Version:

ToloGameDev library for WebGL2

13 lines 408 B
/** * If you want to use an external font in a canvas, * you will have tio load it first. * * ```ts * await tgdLoadFont("MyFont", "https://example.com/myFont.woff2") * const ctx = canvas.getContext("2d") * ctx.font = "24px MyFont" * ctx.fillText("Hello world!", 100, 100) * ``` */ export declare function tgdLoadFont(name: string, url: string): Promise<FontFace>; //# sourceMappingURL=font.d.ts.map