Skip to content

WebFontBakeOptions

Defined in: packages/renderer/src/assets.ts:75

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: packages/renderer/src/assets.ts:83

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: packages/renderer/src/assets.ts:90

Glyph padding in the atlas. Default 4.


optional resolution?: number

Defined in: packages/renderer/src/assets.ts:88

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


optional size?: number

Defined in: packages/renderer/src/assets.ts:77

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


optional style?: Partial<TextStyleOptions>

Defined in: packages/renderer/src/assets.ts:97

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: packages/renderer/src/assets.ts:105

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.