Skip to content

buildTextOptions

buildTextOptions(text, style, bitmap, resolution, extraDefault?): object

Defined in: renderer/src/internal/textConstruction.ts:74

Internal

Build the shared Text / BitmapText constructor options and pick the Pixi class for both TextComponent and UIText. bitmap selects BitmapText, which bakes / looks up its glyph atlas from style.fontFamily. resolution is forwarded only to canvas Text — BitmapText resolution is fixed at font-bake time (Pixi v8 warns if you set it per-instance), so use installBitmapFont({ resolution }).

Centralised so the two text classes can’t drift on the Pixi-v8 resolution-gating rule. extraDefault layers a caller-owned default (the UIPlugin override) between the engine default and the per-text style.

string

TextStyleOptions | undefined

boolean | undefined

number | undefined

TextStyleOptions

object

bitmap: boolean

options: TextOptions

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.