Sprites JavaScript Font Media

The font media: a glyph editor for bitmap fonts, a set of glyphs over one shared cell size, edited one character at a time. It is the flattest media: no layers and no frames, just its glyphs. The editor is built on the shared pixel parts under Sprites.Media.Sprite, the same canvas, draw, move and select tools, palette and info window a sprite uses; only the glyph model, the Tools window and the Characters window are font specific.

Sizes and modes

A font is drawn in a mode, the same as an image: freeform, or a target machine. The mode fixes the glyph cell size and how a pixel is coloured, and the stored format holds the superset of them. A freeform font takes any cell size and full RGBA glyphs, so it can be a colour typeface for the freeform image or the UI. A machine font fixes the cell to that machine's size and its glyphs are one bit, ink or paper, with the colour supplied by the image that places the character.

ModeCell sizeGlyph pixelRedefinable on the machine
FreeformAny sizeFull RGBAn/a
Spectrum8×8Ink or paperYes
C648×8Ink or paperYes
BBC8×8Ink or paperYes
Oric6×8Ink or paperYes
VGA8×16Ink or paperYes
Amiga8×8Ink or paperYes

A saved machine font is what a text image reaches for when its mode allows redefined characters, so the font editor and the image text tool share the same glyphs. The full per machine detail, the default ROM set, the sizes and whether characters can be redefined, lives on the platform font pages.

Sprites.Media.Font Modules

Three modules are font specific. The rest of the editor is the shared pixel toolkit under Sprites.Media.Sprite: the canvas view, the draw, move and select tools, the palette and the info window.

Sprites.Media.Font.Tool

The Tools window and its Windows buttons: the canvas-tool selector over the file, history and characters panels.

Sprites.Media.Font.Chars

The Characters panel: the glyphs flowing in a grid, drawn double size, to pick the one to edit.