TTF-DOOM
A raycaster running inside TrueType font hinting
Details
- External ID
- 47665685
- Source
- HN
- Company
- —
- Product
- TTF-DOOM
- Website domain
- github.com
- Launched
- April 6, 2026
- Cohort
- —
- Upvotes
- 68
- Upvotes percentile
- 0.8650385604113111
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:26 p.m.
- Updated at
- Sept. 7, 2026, 9:26 p.m.
Description
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 (ab)/64, not ab. So 1*4=0. The DIV instruction is equally cursed. - No WHILE loops. Everything compiles to recursive FDEFs. FreeType limits call depth to ~64 frames. - SVTCA[0] is Y, SVTCA[1] is X. Of course.There's a small compiler behind this - lexer, parser, codegen - that turns a C-like DSL into TT assembly.Demo GIF: https://github.com/4RH1T3CT0R7/ttf-doom/blob/main/docs/media...Live demo: https://4rh1t3ct0r7.github.io/ttf-doom/ (Chrome/Edge, WASD+arrows, Space to shoot, Tab for debug overlay)This is a DOOM-style raycaster, not a port of the original engine - similar to DOOMQL and the Excel DOOM. The wall rendering does happen in the font's hinting VM though. Press Tab in the demo to watch the font variation axes change as you move.
Enrichment
- Theme
- typography and unicode text tools
- Vertical
- Media & entertainment
- Function
- Vertical SaaS
- Audience
- B2C
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- doom game inside font hinting
- Manually corrected
- False
Could you build this?
No Writing a 3D raycaster entirely within the esoteric, highly constrained bytecode of the TrueType font hinting virtual machine is an extraordinary feat of reverse engineering and specialized font-tech hacking.
What it would actually take: The project requires compiling a custom raycasting algorithm into the TrueType instruction set (bytecode) interpreted by the font hinting rasterizer, manipulating font control points and glyph outlines to simulate 3D projection. Developing this requires deep expertise in TrueType specifications, font hinting VMs, fixed-point math tricks, and bespoke assembler tooling to emit valid TTF bytecode.
Discussion
12 comments analyzed.
Concerns raised: Only works on Windows, not macOS/Linux, Green vertical bars rendering issue on macOS, Rendering inaccuracy - raycasting vs BSP/polygon drawing, Performance bottleneck with TrueType bytecode hinting, Frame rate limited to 30-60fps depending on browser
Competitors
Other products that read as similar to this one — 69 launches clear the similarity bar, closest 8 shown.
Attention rank: #16 of 70 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 154 days after the earliest competitor.
- QR code renderer in a TrueType font · hn · 2026-06-28 · 118 upvotes · similarity 0.56
- KiDoom · hn · 2025-11-25 · 362 upvotes · similarity 0.43
- Doom (1993) Playable in a GitHub Readme · hn · 2026-01-06 · 5 upvotes · similarity 0.43
- I built a RISC-V emulator that runs DOOM · hn · 2026-05-03 · 50 upvotes · similarity 0.43
- a Rust ray tracer that runs on any GPU · hn · 2025-11-03 · 95 upvotes · similarity 0.39
- WriteMyFont · ph · 2026-09-17 · 1 upvotes · similarity 0.38
- Handwriting Font Maker · ph · 2026-09-27 · 1 upvotes · similarity 0.38
- React hooks that predict text height before render, using font metrics · hn · 2026-04-04 · 8 upvotes · similarity 0.38
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a vertical saas tool for Insurance yet.