Documentation
    Preparing search index...

    Interface BitmapFontOptions

    Everything createBitmapFont needs to assemble a face.

    The shape is deliberately the encoded table plus metrics rather than decoded pixels: that is what a source table looks like, what a converted BMFont or a subsetted face will be generated as, and what stays diffable in a repository.

    interface BitmapFontOptions {
        ascent: number;
        cellHeight: number;
        cellWidth: number;
        fallback: string;
        firstCodePoint: number;
        glyphs: readonly string[];
        glyphTop: number;
        glyphWidth: number;
        name: string;
    }
    Index
    ascent: number

    BitmapFont.ascent; 0…cellHeight. descent is the remainder.

    cellHeight: number

    BitmapFont.cellHeight; a positive integer.

    cellWidth: number

    BitmapFont.cellWidth; a positive integer, and the advance.

    fallback: string

    The missing-glyph box, encoded like the others.

    firstCodePoint: number

    Code point of glyphs[0]; the rest follow consecutively.

    glyphs: readonly string[]

    One encoded row string per code point, from firstCodePoint upwards, with no gaps. Every string must be the same length — that length is the font's row count — and glyphTop + rowCount must fit inside the cell.

    glyphTop: number

    BitmapFont.glyphTop; the cell row the first encoded row occupies.

    glyphWidth: number

    BitmapFont.glyphWidth; 1…5. Capped at five because one base-32 digit is five bits — see MAX_GLYPH_WIDTH.

    name: string