An instance of a font, defined with use of BpxFontConfig.

Static factories

  • A method to create a font as an extension of an already defined font.

    Parameters

    Returns BpxFont

    const pico8FontWithExtraGlyphs = BpxFont.basedOn($font_pico8, baseFontConfig => ({
    ...baseFontConfig,
    glyphs: new Map<string, BpxGlyph>([
    ...baseFontConfig.glyphs,
    // additional glyphs defined here
    ]),
    });

Accessors

  • get spriteSheetUrls(): string[]
  • A list of sprite sheets gathered from the all sprite glyphs defined for this font.

    Useful for defining the assets to fetch in BeetPx.start

    Returns string[]

    $.start({
    // ...
    assets: [
    ...myFont.spriteSheetUrls
    ],
    })

Methods