WebFontOptions
Defined in: packages/renderer/src/assets.ts:109
Options for webFont.
Properties
Section titled “Properties”bitmap?
Section titled “bitmap?”
optionalbitmap?:boolean|WebFontBakeOptions
Defined in: packages/renderer/src/assets.ts:133
Also bake a bitmap glyph atlas from the loaded face under the same family,
so the one webFont name works for both canvas Text (no bitmap) and
BitmapText (bitmap: true). true bakes with defaults; pass a
WebFontBakeOptions object to control size, charset, emphasis
variants, and baked style.
Requires family so the baked atlas has a stable name to register under
and uninstall on unload; baking is skipped (with a warning) when family
is omitted.
webFont("fonts/Inter.woff2", { family: "Inter", bitmap: { size: 24 } });// <TextComponent style={{ fontFamily: "Inter" }} /> → canvas Text// <TextComponent bitmap style={{ fontFamily: "Inter" }} /> → bitmap atlasfamily?
Section titled “family?”
optionalfamily?:string
Defined in: packages/renderer/src/assets.ts:115
@font-face family the loaded face registers under — the name you then
pass as style.fontFamily on Text / UIText / TextComponent.
Omit to let Pixi derive it from the file name.