Skip to content

buildTextOptions

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

Defined in: packages/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 TextBitmapText 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