Geometry · const
GLYPH_WIDTH
A 5x7 pixel font, as bitmasks.
Explained in Hello world, Meshes and geometry.
const GLYPH_WIDTH = 5import { GLYPH_WIDTH } from '@driftengine/core';In depth
Glyphs are built rather than loaded, for the same reasons the cursor is: no asset, no request, no licence, and — the one that matters — a shape the renderer can extrude. A font file gives you outlines to rasterise; a grid of cells gives you boxes to light, which is what makes text belong in a flat-shaded world instead of floating over it.
Five by seven is the smallest grid that carries a legible uppercase alphabet with digits. Anything smaller starts guessing between 8, B and 6 at a glance, which is exactly the glance a notification gets.
Each glyph is seven rows, each row five bits, most significant bit leftmost.