Weird Techfontstruetypedoomopen-sourcegraphics
A DOOM-style raycaster lives inside a TrueType font's hinting bytecode, and the browser draws its 3D walls by re-hinting one glyph
A 6,580-byte font named doom.ttf carries a working DDA raycasting engine written in TrueType's hinting language, so the letter 'A' becomes a wall of a 16x16 maze when Chrome renders it.

A font is supposed to describe the shape of letters. TrueType also lets a font carry hints: tiny programs that nudge a glyph’s outline so it lands cleanly on a low-resolution pixel grid. Those programs run on a little stack machine built into the font renderer, and they turn out to be far more capable than straightening the stem of a lowercase ‘m’.
The ttf-doom font puts a 3D engine in there. “The font file contains a DDA raycasting engine written in TrueType bytecode,” the README says. The glyph “A” has 16 vertical bar contours, and the hinting program raycasts against a 16x16 tile map, sliding those 16 bars to the right heights to paint a first-person view of a maze. You open a page in the browser and the walls are drawn by the act of rendering a letter.
Getting there meant fighting the instruction set the whole way. There is no multiply that behaves. “MUL does (a*b)/64. Not a*b,” the notes warn, because the format thinks in fixed-point fractions. There are no while loops either, so “loops compile to recursive FDEFs, and FreeType caps the call stack at ~64 frames” — every loop is a function that calls itself, and the engine is allowed to go only about 64 deep before the renderer gives up. To stay sane, the author “wrote a small compiler that takes a custom DSL and outputs TrueType hinting assembly,” then let that spit out the 6.5 KB the browser runs.
Stunts like this have a long pedigree — DOOM has been coaxed onto pregnancy tests, oscilloscopes and PDF files — but the font version has a sharper point than most. It isn’t running next to the renderer; it is running as the renderer’s own workload. The browser didn’t get tricked into launching a game. It did exactly its job, which happens to include executing whatever program a font packs into its hints.