API reference
Preparing search index…

FontMeasureBuffer

Reusable native UTF-8, offset and width storage for font measurement.

Capacities are fixed. Native measurement validates all active slices, then overwrites active widths in place. Escaped views retain storage after collection and shutdown. Direct writers supply an explicit row count to FontEngineInterface.measureStrings.

Source & inheritance
Member directory7

Constructors

Accessors

Methods

Constructors

Accessors

  • get bytes(): Uint8Array

    Shared packed UTF-8 bytes; unused capacity is not measured.

    Returns

    Uint8Array

    Fixed writable byte view.

    Source & inheritance
  • get offsets(): Uint32Array

    Shared row boundaries, starting at zero and monotonically increasing.

    Returns

    Uint32Array

    Capacity plus one uint32 offsets.

    Source & inheritance
  • get widths(): Int32Array

    Shared int32 output reused by every measurement.

    Returns

    Int32Array

    Width view; inactive rows retain their previous values.

    Source & inheritance

Methods

  • Encode one string directly into the native byte view.

    Parameters

    string
    string

    Text; isolated UTF-16 surrogates become U+FFFD.

    Returns

    void

    RangeError when row or byte capacity is exhausted; the logical length and active slices remain unchanged.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0