loadFont(name: string, src: string | BinaryData, opt?: LoadFontOpt): Asset

Load a font (any format supported by the browser, e.g. ttf, otf, woff).

sincev3000.0

// load a font from a .ttf file
loadFont("frogblock", "fonts/frogblock.ttf")
kaplay logo

3001.0.0-alpha.18

Misc