# Fonts and lettering

Apache has three glyph alphabets in the reference software engine: 3 × 5 and 5 × 9 instrument lettering, and the menu alphabet loaded from `FONTS/11X15.LBM`.

## Instrument fonts

`_character_cells_3x5` and `_character_cells_5x9` contain 130 characters each. Every row occupies one byte, with the left pixel in bit 7. The unused low bits are zero. The two drawing routines write only the set bits in the requested palette colour, leaving the background intact. Both have a fast path for characters wholly inside the screen and a clipped path at its edges.

The font descriptors contain a drawing callback, nominal width and height, flags, and an optional width table. Fixed-width characters advance by width + 1, so the small font advances four pixels and the larger font six. Line spacing is height + 1.

## Menu font

The source is a 640 × 480 IFF image. The loader reads 256 cells in a 32-column grid, with 17-pixel cell spacing. Each cell supplies 16 × 16 pixels. Source indices 0 and 1 are background; index 2 becomes a set glyph pixel. These cells occupy 65,536 bytes after loading.

Character widths come from the rightmost occupied column. Empty cells use a five-pixel advance. All digits share the widest digit's advance. The two menu descriptors use the same drawing callback and cells, with line spacing of 16 or 20 pixels. Despite its name, the `menu_11x18` descriptor stores a height of 19. A separate `draw_menu_11x18_` routine offsets its image down one pixel, but the initialiser binds both descriptors to `draw_menu_11x15_`.

## Verification and exports

[The comparison report](native-font-check.json) covers every original character renderer at a normal position and two clipped positions, plus the loaded menu cells and widths. The original loader and drawing code execute unchanged in the analysis harness.

The TrueType and WOFF2 versions trace horizontal runs of square pixels. ASCII characters retain their usual Unicode assignments. Every original byte slot is also available at U+E000 + byte value, preserving the extra symbols without inventing an extended character encoding. The character sheets and browser include all slots, including empty ones.

At 1× magnification, one original pixel occupies one physical display pixel. The browser compensates for desktop DPI scaling and browser zoom instead of treating a CSS pixel as a display pixel.
