IFClite TypeScript API
    Preparing search index...

    Class SymbolicTextAtlas

    Index
    atlasSize: number
    baselinePx: number

    Distance from glyph top to baseline, constant for the chosen font size.

    canvas: HTMLCanvasElement
    glyphPx: number
    rowHeight: number
    • Get or lazily rasterise a glyph. Returns null when the atlas is full — callers should fall back to a missing-glyph quad (typically the space character or a small box).

      Parameters

      • char: string

      Returns GlyphInfo | null

    • Bumps each time a new glyph is rasterised so the renderer knows to re-upload.

      Returns number

    • Layout a UTF-16 string against the atlas. Code points outside the BMP are passed through as surrogate pairs which Canvas2D renders correctly. Empty advance entries are emitted for missing glyphs so the layout cursor still progresses.

      out is filled with one record per code point. Returns the total advance width in atlas pixels (caller uses this for alignment).

      Parameters

      • s: string

      Returns { glyphs: GlyphLayoutEntry[]; totalAdvancePx: number }