Live data from Hacker News

Jim's TrueType QR Code Font

github.com

11–20 of 31 posts

Re: Jim's TrueType QR Code Font

#11
post #4

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

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

#12
post #3

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

The page addresses this issue, saying that browser text wrapping can cause issues and gives advice on how to deal with it.

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

#15
post #4

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

Did you read the explanation? It says right there on the page why it happens. Or was that text added since you viewed it?

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

#16
post #9

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

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

#17
post #9

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

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

#18
post #9

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

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

#19
post #4

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

Did you read the explanation? It says right there on the page why it happens. Or was that text added since you viewed it?

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

#20
post #12

Earlier quoted context omitted.

The page addresses this issue, saying that browser text wrapping can cause issues and gives advice on how to deal with it.

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

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.
Post reply on HN