alt.hn

4/6/2026 at 7:25:39 PM

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

https://github.com/4RH1T3CT0R7/ttf-doom

by 4RH1T3CT0R

4/6/2026 at 11:11:07 PM

You are (or I suspect your LLM is) not correct about Doom using a raycasting engine. Wolfenstein fits that description, yes. Doom rather famously introduced BSP for level data and it draws sorted polygons front-to-back without ray-marching.

by tadfisher

4/7/2026 at 4:14:37 AM

technically yes, most constrained-platform ports (as I remember) do the same though (DOOMQL, the TI-84 version, the Excel one) since BSP is hard to fit into a limited VM. "DOOM-style" here is more about the genre than the rendering technique

by 4RH1T3CT0R

4/7/2026 at 4:34:57 AM

It's not really a "DOOM-style raycaster" then, it's a Wolfenstein 3D-style raycaster.

Pretty cool though!

by bananaboy

4/7/2026 at 7:55:47 AM

Thanks!

by 4RH1T3CT0R

4/6/2026 at 11:00:40 PM

I tried playing the demo, and it was just green bars for me. The walls didn't scale up or shrink, it was just a bunch of solid static green bars.

The enemies did scale up and shrink as I got closer, and the minimap worked.

Tried with Brave on Linux, and Google Chrome on macOS.

by tombert

4/7/2026 at 4:06:08 AM

This is a FreeType issue - it uses auto-hinter by default on Linux and doesn't run the TT bytecode. No fix from CSS side unfortunately. Works on Windows/macOS where DirectWrite/CoreText run the bytecode

by 4RH1T3CT0R

4/7/2026 at 4:09:54 AM

It didn't work on macOS either.

by tombert

4/7/2026 at 7:47:37 AM

Yeah. Sorry - on MacOS in Chrome / Safari only green vertical bars.

by wingi

4/7/2026 at 7:51:00 AM

Then only windows :(

by 4RH1T3CT0R

4/6/2026 at 9:12:47 PM

Ok the MUL workaround got me. MUL does (ab)/64 so you have to DIV first to get a64, then MUL finally gives you a*b. And recursive FDEFs because there's no WHILE? All in 6.5KB? What kind of frame rate do you actually get out of this?

by emanuele-em

4/6/2026 at 9:26:44 PM

Frame rate depends on the browser - Chrome gives around 30-60fps on my machine, but the bottleneck is actually Chrome deciding whether to re-run hinting at all (had to add axis jitter to force it). The TT bytecode itself executes fast, it's maybe a few thousand instructions per frame

  The recursive FDEF thing is the worst part honestly. Every while loop is a function that calls itself, and FreeType kills you at ~64 deep. So you're constantly juggling how many columns vs how many ray steps you can afford

by 4RH1T3CT0R

4/7/2026 at 3:49:30 AM

> TrueType MUL does (ab)/64, not ab

This is how fixed-point arithmetic works. For multiplication of Q26.6 numbers you clear the squared scaling factors (2^6) by dividing/shifting one of them away.

by kevin_thibedeau