NES Fonts

The NES has no font hardware and no character generator. Text is drawn the same way as any other background: as 8×8 tiles held in a pattern table and placed through the nametable. A font is just a set of glyph tiles in CHR, and how letters map to tiles is entirely up to the game.

NES Fonts

Overview

There is no ROM font and no print routine in the console. If a game shows text, it has drawn each letter as a tile and stored those tiles in its own CHR data. Writing text means writing tile numbers into the nametable at the cells where the letters should appear. Because the glyphs are ordinary background tiles, they share every property of the background: 8×8 size, 2 bits of colour, and colouring by the attribute grid.

Glyphs as tiles

A font is a run of tiles in a pattern table, one tile per glyph. To print a character the code writes that glyph’s tile index into the right nametable byte, exactly as it would place any scenery tile. Since a nametable holds 32×30 tiles, a text screen is up to 32 characters wide and 30 rows tall, each character occupying one 8×8 cell.

This means a “font” on the NES is simply a design decision: reserve a block of tiles for letters and digits, draw them, and reference them by index. Games often keep a small font in the same pattern table as their other background art.

Tile format

A glyph tile uses the same 2bpp planar format as every background tile: 16 bytes, the first 8 the low bit-plane and the next 8 the high bit-plane, one byte per row with the most significant bit on the left. Most fonts use only two of the four available values, a background value and one ink value, so the glyph reads as a simple two-colour shape, but all three ink values are available for shaded or outlined lettering.

BytePlaneMeaning
0–7Low bit-planeBit 0 of each pixel, one byte per row.
8–15High bit-planeBit 1 of each pixel, one byte per row.

ASCII to tile mapping

Nothing forces a glyph’s tile number to match its ASCII code. The mapping from a character to a tile index is defined by the game. Many titles arrange their font so that tile 0 is space and the letters follow in order, letting the code turn a character into a tile with a simple offset; others use a lookup table because their tiles are packed in a different order, or because the alphabet is compressed to save space.

CharacterExample tile index
SpaceGame-defined base, often 0 or $20
‘A’ to ‘Z’Consecutive tiles from the letter base
‘0’ to ‘9’A separate run of digit tiles

Because the console imposes no character set, a game can encode text however it likes, so long as its own routine converts each character to the matching tile index before writing it to the nametable.

Colouring text

Text colour follows the background rules. A glyph’s pixel values select entries in whichever background palette the attribute table assigns to that 16×16 region. To colour a line of text a game sets the attribute bytes covering those cells to the wanted palette. Since the attribute grid is coarse, text is usually laid out so a whole message or menu box shares one palette, keeping the colouring simple and clash-free.