API reference
Preparing search index…

FontEngineInterface

Native Rml::FontEngineInterface with shared values and host virtuals.

Only the selected engine performs font operations. Core manages its Initialize/Shutdown lifecycle. Construction does not start a font provider. The default FreeType engine performs glyph and atlas work in C++. Custom callbacks are explicit synchronous host operations; an advance table keeps custom width computation in Native.

Source & inheritance
Member directory13

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Find a font face by family, slant, weight and pixel size; normalize the family to lowercase.

    Parameters

    family
    string

    Registered font family.

    style

    Normal or Italic.

    weight
    number

    Integer 1–1000.

    size
    number

    Pixel size from 1 to 33554431, fitting FreeType 26.6 units.

    Returns

    Generation-checked token or null when no face matches.

    Source & inheritance
  • Measure text width in pixels using the selected font and shaping context.

    Parameters

    face

    Live face token.

    string
    string

    Text to measure.

    shapingOptional

    Owned shaping context; omitted uses defaults.

    priorCharacter
    number = 0

    Prior Unicode code point; defaults to zero.

    Returns

    number

    Native integer pixel width.

    Source & inheritance
  • Measure multiple strings in one native entry, in input order.

    Parameters

    face

    Live face token.

    strings
    readonly string[]

    Strings sharing one face and shaping configuration.

    shapingOptional

    Owned shaping context; omitted uses defaults.

    priorCharacter
    number = 0

    Prior code point for each string; defaults to zero.

    Returns

    Int32Array

    Native-owned shared int32 widths; survive collection and shutdown.

    Source & inheritance
  • Measure packed UTF-8 slices into existing native width storage.

    Parameters

    face

    Live face token.

    buffer

    Reusable native input and output.

    shapingOptional

    Shaping parameters; omitted uses defaults.

    priorCharacter
    number = 0

    Prior code point per row; defaults to zero.

    countOptional
    number

    Active rows; defaults to the append length.

    Returns

    Int32Array

    The original full width view, updated in place.

    This entry does not allocate or copy input/result buffers. Cold glyph loads and custom font engines may allocate their own storage.

    Source & inheritance
  • Register upstream HarfBuzz language metadata before initialization.

    Parameters

    language
    string

    BCP47 language tag used by TextShapingContext.language.

    script
    string

    Four-letter ISO15924 script, such as Arab or Latn.

    direction
    "ltr" | "rtl"

    Flow used when the shaping context selects Auto.

    Returns

    void
    Source & inheritance
  • Release fonts through Core and invalidate all face/effects/atlas tokens.

    Returns

    void

    Reattaches or collects detached trees before release. Registered face data and numerical snapshots remain available.

    Source & inheritance

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