Settings

Theme

Show HN: QR code renderer in a TrueType font

qr.jim.sh

81 points by foodevl 5 days ago · 12 comments · 1 min read

Reader

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).

layer8 a day ago

Side question: Why is nobody making QR codes on web pages clickable (regardless if it’s an image or text-based)? Not every QR code represents a URL, of course, but many do. Maybe there should be a qrcode URL scheme that lets browsers behave the same way as a camera scanning a QR code.

lifthrasiir a day ago

See https://github.com/jimparis/qr-font/blob/master/design.md for the actual design. As who have written a QR code encoder library... I'm in shock and awe.

foodevlOP 5 days ago

1bpp's comment suggesting this yesterday: https://news.ycombinator.com/item?id=48682460

WenboS 4 days ago

This is absolute black magic. I never realized OpenType rules were powerful enough to render something as complex as a QR matrix inline.

bigboss2700 4 days ago

That's a wonderfully cursed idea.

magnat a day ago

Selecting parts of the code (in F7 mode or with SHIFT-LEFT/RIGHT) highlights which individual pixels corresponds to the actual letters.

henryagi a day ago

That's a wonderfully idea. I Like

red_hare a day ago

Wow. This is so freaking cool.

1bpp 3 days ago

This is terrifying, great job!

jqpabc123 a day ago

Impressive work!

Not mentioned is the fact that the resulting QR Fonts are huge --- much larger than the javascript needed to render a QR code.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection