FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Show HN: TTF-DOOM – A raycaster running inside TrueType font hinting
NewsTools

Show HN: TTF-DOOM – A raycaster running inside TrueType font hinting

via Hacker News4RH1T3CT0R6h ago

TrueType fonts have a hinting VM that grid-fits glyphs. It has a stack, storage area, conditionals, function calls, and it turns out it's Turing-complete. So I built a raycasting engine in the hinting bytecode. The glyph "A" in the font has 16 vertical bar contours. The hinting program reads player coordinates from font variation axes via GETVARIATION, does DDA ray marching against a tile map in the storage area, and repositions bar heights with SCFS. It ends up looking like a crude Wolfenstein-style view. Small visuzlization: https://github.com/4RH1T3CT0R7/ttf-doom/blob/main/docs/media... About 6.5 KB of bytecode total - 13 functions, 795 storage slots, sin/cos lookup tables. JS handles movement, enemies, and shooting, then passes the coordinates to the font through CSS font-variation-settings. The font is basically a weird GPU. The weirdest parts: - TrueType MUL does (a b)/64, not a b. So 1*4=0. The DIV instruction is equally cursed. - No WHILE loops. Everything compiles to recursive

Continue reading on Hacker News

Opens in a new tab

Read Full Article
0 views

Related Articles

News

Breaking In: A patch to finally unlock the best VCD player the SEGA Dreamcast -

Reddit Programming • 3h ago

clmystery: A command-line murder mystery
News

clmystery: A command-line murder mystery

Lobsters • 5h ago

News

The Downfall and Enshittification of Microsoft in 2026

Lobsters • 6h ago

News

When not to use Event Sourcing?

Reddit Programming • 8h ago

A Cryptography Engineer’s Perspective on Quantum Computing Timelines
News

A Cryptography Engineer’s Perspective on Quantum Computing Timelines

Lobsters • 9h ago

Discover More Articles