logoalt Hacker News

Show HN: QR code renderer in a TrueType font

59 pointsby foodevllast Sunday at 12:37 AM11 commentsview on HN

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


Comments

layer8today at 6:49 PM

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.

lifthrasiirtoday at 6:45 PM

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.

henryagitoday at 8:32 PM

That's a wonderfully idea. I Like

foodevllast Sunday at 12:38 AM

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

WenboSlast Sunday at 2:02 PM

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

show 2 replies
bigboss2700last Monday at 9:27 AM

That's a wonderfully cursed idea.

magnattoday at 7:16 PM

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

red_haretoday at 6:44 PM

Wow. This is so freaking cool.

1bpplast Monday at 4:21 PM

This is terrifying, great job!