Show HN: QR code renderer in a TrueType font (qr.jim.sh)
In the "Libre Barcode Project" discussion yesterday, 1bpp asked: "Is anyone willing to sacrifice their sanity for the sake of implementing a QR renderer as TTF hinting code?"
Yes. I had some tokens to burn and was curious... turns out, it's possible. This was put together by a mix of Gemini, GPT, and Claude (depending on which usage limits kept running out).
17 comments of 18
[ 3.4 ms ] story [ 43.0 ms ] threadIf there is a turing complete VM inside the font renderer that makes perfect sense.
I'm not sure if it's the case but at one point on Windows, font rendering happened in the kernel.
as an aside- I find the fact even microsoft's own modal dialogs don't all support DPI scaling- aka they are blurry.
Both Windows and Macintosh spent years trying to isolate type rendering from kernel operations specifically because of Adobe Type 1's legacy alone, including the fact that it was an ugly vendored 3rd party spaghetti. IIRC, both Apple and Microsoft ended up paying Adobe tons of money to rewrite their Type 1 Font Manager code from scratch rather than keep paying Adobe to write that code. (TTF and OpenType were also both somewhat direct responses to Type 1's legacy and mistakes.)
[1] https://en.wikipedia.org/wiki/PostScript_fonts
Once something is Turing-complete, the magic turns from black to white. ;)
Not mentioned is the fact that the resulting QR Fonts are huge --- much larger than the javascript needed to render a QR code.