Skip to content

Documentation / @debuffjp/core / BitmapFontOptions

Interface: BitmapFontOptions ​

Defined in: render/bitmap-font.ts:3

Properties ​

chars ​

chars: string

Defined in: render/bitmap-font.ts:7

The characters the frames hold, in order.


fallback? ​

optional fallback?: string

Defined in: render/bitmap-font.ts:20

Drawn for characters the font lacks. Default "?" if present, else nothing.


frames ​

frames: readonly Frame[]

Defined in: render/bitmap-font.ts:5

One frame per glyph, in the order of chars: usually assets.frames("font") from a font@WxH.png grid.


lineHeight? ​

optional lineHeight?: number

Defined in: render/bitmap-font.ts:18

Pixels from one line's top to the next. Default the cell height + 1.


spaceWidth? ​

optional spaceWidth?: number

Defined in: render/bitmap-font.ts:16

Advance for a space (and any glyph that measures empty). Default a third of the cell height, rounded.


spacing? ​

optional spacing?: number

Defined in: render/bitmap-font.ts:14

Pixels between glyphs. Default 1.


widths? ​

optional widths?: number | readonly number[]

Defined in: render/bitmap-font.ts:12

Advance per glyph in pixels. Default: measured from each glyph's rightmost opaque column, so a grid drawn in Aseprite becomes a proportional font. Pass a number for a monospaced font.