Skip to content

textmode.js / fonts / TextmodeTilesetOptions

Interface: TextmodeTilesetOptions

Configuration used to load a tileset image into a normalized glyph atlas.

Properties

PropertyTypeDescription
columnsnumberNumber of columns in the authored tileset sheet.
count?numberOptional number of tiles to import from the sheet. Defaults to columns * rows.
fontSize?numberOptional effective output cell height. Defaults to the native tile height.
map?string | string[] | URLOptional explicit character mapping as a .char URL/path, inline grid string, or array of row strings. When omitted, tiles are assigned sequentially starting at space (32).
margin?numberOptional uniform outer margin in pixels.
marginX?numberOptional horizontal outer margin in pixels. Overrides margin for the x axis.
marginY?numberOptional vertical outer margin in pixels. Overrides margin for the y axis.
rowsnumberNumber of rows in the authored tileset sheet.
sourcestring | URL | CanvasImageSourceSource image or URL for the authored tileset sheet.
spacing?numberOptional uniform spacing between tiles in pixels.
spacingX?numberOptional horizontal spacing between tiles in pixels. Overrides spacing for the x axis.
spacingY?numberOptional vertical spacing between tiles in pixels. Overrides spacing for the y axis.