Documentation
    Preparing search index...

    Interface GlyphAtlas

    A packed font: RGBA8 texels, plus the table that says where each glyph is.

    The first three fields are deliberately @fourjs/render's TextureSource — see the module header.

    interface GlyphAtlas {
        ascent: number;
        cellHeight: number;
        cellWidth: number;
        data: Uint8Array;
        descent: number;
        fallback: GlyphAtlasEntry;
        font: BitmapFont;
        glyphs: ReadonlyMap<string, GlyphAtlasEntry>;
        glyphsById?: ReadonlyMap<number, GlyphAtlasEntry>;
        height: number;
        lineHeight: number;
        padding: number;
        width: number;
    }
    Index
    ascent: number

    Pixels from a cell's top edge to the baseline.

    cellHeight: number

    Cell height in texels.

    cellWidth: number

    Cell width in texels — copied from the font so layout needs only the atlas.

    data: Uint8Array

    Tightly packed RGBA8 texels, width * height * 4 bytes, row 0 first and row 0 is the bottom row (v = 0) — the orientation @fourjs/render's TextureSource documents and GL's default unpack expects.

    descent: number

    Pixels from the baseline to a cell's bottom edge.

    fallback: GlyphAtlasEntry

    The cell drawn for characters absent from GlyphAtlas.glyphs.

    The font this atlas was built from.

    glyphs: ReadonlyMap<string, GlyphAtlasEntry>

    Every covered character, keyed by single-character string.

    glyphsById?: ReadonlyMap<number, GlyphAtlasEntry>

    Font-specific glyph IDs; built-in IDs equal Unicode code points.

    height: number

    Texture height in texels; a power of two.

    lineHeight: number

    Baseline-to-baseline distance in pixels at single spacing.

    padding: number

    Transparent gutter in texels between cells, and around the edges.

    width: number

    Texture width in texels; a power of two.