News for hackers. Stuff that matters.
Re:Jim's TrueType QR Code Font by athenot on Tuesday July 07, 2026 @03:06PM (#48822170)
Maybe it's not practical for day-to-day use but the way this hacks the font to produce something completely different is amazing!
Re:Jim's TrueType QR Code Font by shreddit on Tuesday July 07, 2026 @02:24PM (#48821588)
It doesn’t seem to like spaces that much, the code for [QR coded] is broken for me on safari ios. When the space is removed it’s a working qrcode again
Re:Jim's TrueType QR Code Font by diroussel on Tuesday July 07, 2026 @04:28PM (#48823248)
The page addresses this issue, saying that browser text wrapping can cause issues and gives advice on how to deal with it.
Re:Jim's TrueType QR Code Font by jrmg on Tuesday July 07, 2026 @04:50PM (#48823549)
I think this is a different problem.

The page says that “browsers may split a QR code across lines” - but this isn’t split across lines.

Experimenting, if I just type "[Q R]" (very short, so not likely to line-break), the problem still occurs.

If I inspect the element, and add `white-space: nowrap;` to its style, the problem still occurs (although the text doesn’t wrap!).

Re:Jim's TrueType QR Code Font by foodevl on Tuesday July 07, 2026 @09:05PM (#48826179)
I haven't tried on macos, but yeah, the biggest problem right now seems to be implementation differences with how embedded spaces are handled. Earlier, the biggest cross-browser issues were pixel alignments within the QR codes, but those seem largely resolved.
Re:Jim's TrueType QR Code Font by jeroenhd on Wednesday July 08, 2026 @06:55AM (#48830316)
It looks like Safari doesn't render this correctly (checked on macOS). Works fine in Chrome and Firefox, though. Must be a Safari quirk of some kind.
Re:Jim's TrueType QR Code Font by zb3 on Tuesday July 07, 2026 @04:12PM (#48823049)
Unfortunately the most important thing here is missing - the whole explanation, like how did we get there, what those fonts can do and so on..
Re:Jim's TrueType QR Code Font by altairprime on Tuesday July 07, 2026 @05:56PM (#48824470)
That’s a common downside of HN: submitters often link the GitHub repository rather than the project’s explanation. The article’s had the project link added at the top (just below the GitHub link) and it has a much clearer story.
Re:Jim's TrueType QR Code Font by karunamurti on Tuesday July 07, 2026 @06:34PM (#48824949)
OpenType specification is Turing complete, its hinting engine does math during rasterization and its GSUB (Glyph Substitution, a layout and shaping engine) does glyph stacking, QR code correction, etc to finalize the QR. The nice thing about it is if you copy and paste it, it goes to the original text.
Re:Jim's TrueType QR Code Font by foodevl on Tuesday July 07, 2026 @09:11PM (#48826217)
This doesn't use hinting. Some reasons why are listed at: https://github.com/jimparis/qr-font/blob/master/design.md#wh...
Re:Jim's TrueType QR Code Font by bch on Tuesday July 07, 2026 @09:57PM (#48826561)
What a vector (no pun intended) for malware or other computation…
Re:Jim's TrueType QR Code Font by foodevl on Tuesday July 07, 2026 @09:01PM (#48826146)
Some details of how it works are in https://github.com/jimparis/qr-font/blob/master/design.md

Fair warning though: this was designed and implemented by an LLM, as an experiment to see if it was possible. I only guided it to a working solution by pointing out problems, and never dug deeply into its inner workings.

Re:Jim's TrueType QR Code Font by trillic on Tuesday July 07, 2026 @03:56PM (#48822885)
Font rendering should scare you
Re:Jim's TrueType QR Code Font by b112 on Wednesday July 08, 2026 @09:17AM (#48831555)
Indeed, I have all font downloads off in all my browsers, by default.
Re:Jim's TrueType QR Code Font by andix on Tuesday July 07, 2026 @02:25PM (#48821598)
Impressive, but on iOS 27 even one of the examples don't work. Seems like it has an issue with spaces. https://imgur.com/a/tZGqtjR
Re:Jim's TrueType QR Code Font by diroussel on Tuesday July 07, 2026 @04:29PM (#48823263)
Did you read the explanation? It says right there on the page why it happens.

Or was that text added since you viewed it?

Re:Jim's TrueType QR Code Font by andix on Tuesday July 07, 2026 @05:42PM (#48824306)
I probably didn’t read it. But I also had to read it twice to understand what it meant.

I’m still not sure if this is the mentioned issue or a different one.

Re:Jim's TrueType QR Code Font by foodevl on Tuesday July 07, 2026 @09:06PM (#48826188)
Just glancing I would say it seems a bit different.
Re:Jim's TrueType QR Code Font by Groxx on Tuesday July 07, 2026 @09:04PM (#48826171)
The only thing I'm seeing there is that line-wrapping might do [something], and a suggested workaround (which, oddly, they don't implement on the page). And the line-wrapping issue doesn't look like that to me, at least when I do it.
Re:Jim's TrueType QR Code Font by jeroenhd on Wednesday July 08, 2026 @07:00AM (#48830348)
Checked on my phone, Chrome+Firefox work, WebKit (through wpe-android) doesn't. Safari and WebKit can't render this font for some reason, I suppose.
Re:Jim's TrueType QR Code Font by ChrisArchitect on Tuesday July 07, 2026 @12:45PM (#48820309)
Re:Jim's TrueType QR Code Font by LoganDark on Tuesday July 07, 2026 @03:01PM (#48822098)
Spaces are definitely broken in Safari.
Re:Jim's TrueType QR Code Font by andonumb on Tuesday July 07, 2026 @05:37PM (#48824228)
Great idea, but it's a shame that it only supports Basic Latin (English-only).
Re:Jim's TrueType QR Code Font by jhogervorst on Tuesday July 07, 2026 @05:41PM (#48824288)
A fun benefit seems to be that you can select the QR code as text and copy it, which puts the original text in your clipboard.
Re:Jim's TrueType QR Code Font by maguay on Wednesday July 08, 2026 @03:10AM (#48828608)
This ... means the page could render a QR code for humans while letting bots see the actual URL. That is incredibly cool.
Re:Jim's TrueType QR Code Font by dspillett on Wednesday July 08, 2026 @08:45AM (#48831218)
Or with some tweaks to the font code they could see a different URL…

This could be used for good (diverting bots away from where you don't want them) or evil (different destinations for user and other readers of the page could be used to trick people going to undesirable locations, because the apparent URL checks out find according to automated scanners).

Re:Jim's TrueType QR Code Font by bulder on Wednesday July 08, 2026 @11:12AM (#48833027)
Conventional web technologies already can handle this kind of use case, either by wrapping an image in a link tag, or using an alt= value.
Re:Jim's TrueType QR Code Font by yetihehe on Thursday July 09, 2026 @09:19AM (#48845373)
I think qr code is more readable by bots than humans and I would prefer to see actual url...
Re:Jim's TrueType QR Code Font by notRobot on Wednesday July 08, 2026 @10:23AM (#48832371)
This is SO COOL. Works perfectly in FF for me, if it can be made to work in safari then this might be one of the easiest ways to generate and display QR codes on the front-end.