API

Function createDefaultTextData

  • Shape text with the default layout, extract glyph curves, and bundle into a DefaultTextData. textColor is applied as the run's defaultColor (per-glyph color overrides remain available via direct updateTextData(replaceRun) calls).

    The returned DefaultTextData owns its underlying GlyphStorage — release both with disposeDefaultTextData(data).

    Parameters

    • font: Font
    • fontSizePx: number
    • text: string
    • OptionaltextColor: readonly [number, number, number, number]
    • Optionaloptions: TextLayoutOptions

    Returns DefaultTextData