Skip to content

WebFontBakeOptions

Defined in: renderer/src/assets.ts:125

Declarative atlas-baking config for a webFont loaded with bitmap set. Mirrors InstallBitmapFontOptions minus name / family — the baked bitmap font registers under the same family as the canvas face, so one webFont name drives both the canvas Text and the BitmapText registries (separate registries, no collision).

optional chars?: string | (string | string[])[]

Defined in: renderer/src/assets.ts:133

Character set to bake. Accepts Pixi’s range syntax, e.g. [["a", "z"], ["A", "Z"], "0123456789 .,!?"]. Defaults to Pixi’s alphanumeric set — remember to include a space.


optional padding?: number

Defined in: renderer/src/assets.ts:140

Glyph padding in the atlas. Default 4.


optional resolution?: number

Defined in: renderer/src/assets.ts:138

Atlas resolution multiplier. 2 keeps glyphs crisp when the text is upscaled by a pixel-art camera. Default 2.


optional size?: number

Defined in: renderer/src/assets.ts:127

Glyph size (px) to bake the atlas at. Default 32.


optional style?: Partial<TextStyleOptions>

Defined in: renderer/src/assets.ts:147

Extra TextStyle props baked into every glyph (fill, stroke, weight, drop shadow…). fontFamily / fontSize are managed by the baker. fill defaults to white so per-text fill / tint can recolour the glyphs — set it explicitly to bake a fixed colour instead.


optional variants?: BitmapFontVariant[]

Defined in: renderer/src/assets.ts:155

Weight/style emphasis atlases to bake alongside the base font from the same source face — the same declarative model as InstallBitmapFontOptions.variants. A BitmapText whose style.fontWeight/fontStyle asks for bold or italic then renders from the matching synthetic atlas.

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.