Show HN: QR code renderer in a TrueType font

Hacker News Top Tools

Summary

A TrueType font that uses OpenType rules to render QR codes from bracketed text inline, without separate image generation.

In the &quot;Libre Barcode Project&quot; discussion yesterday, 1bpp asked: &quot;Is anyone willing to sacrifice their sanity for the sake of implementing a QR renderer as TTF hinting code?&quot;<p>Yes. I had some tokens to burn and was curious... turns out, it&#x27;s possible. This was put together by a mix of Gemini, GPT, and Claude (depending on which usage limits kept running out).
Original Article
View Cached Full Text

Cached at: 07/01/26, 08:01 PM

# Jim's TrueType QR Code Font Source: [https://qr.jim.sh/](https://qr.jim.sh/) This is a real TrueType/OpenType font that turns bracketed text into QR codes during text shaping\. There is no separate image generation or preprocessing step: type text like`\[hello\]`, apply the font, and the font's built\-in OpenType rules render the QR code\. Because the QR code is still text, you can copy and paste the rendered QR block as ordinary characters, store it in plain text, or mix it inline with regular Latin text\. Text outside brackets remains readable\. **Browser Line\-Wrapping Note:**Because layout engines perform line\-breaking on the Unicode text before shaping, browsers may split a QR code across lines if it contains break opportunities \(like spaces, dots, or slashes\) and hits the edge of a text container\. For reliable rendering in HTML, wrap the bracketed block in a container styled with`white\-space: nowrap;`or`display: inline\-block;`\. Font Direct Input Font Apply QR font to textbox TextUse printable ASCII inside square brackets\. QR Font 1\-L supports up to 17 characters per block; QR Font 2\-L supports up to 32; QR Font 3\-L supports up to 53\. Text outside brackets remains ordinary Liberation Sans\-derived text\. Hello \[QR coded\] world\! This page: \[http://qr\.jim\.sh/\] [Download QR Font 1\-L](https://qr.jim.sh/qrfont-1L.ttf?h=263173ec)[Download QR Font 2\-L](https://qr.jim.sh/qrfont-2L.ttf?h=1447aaa7)[Download QR Font 3\-L](https://qr.jim.sh/qrfont-3L.ttf?h=9eac9e2c)[Source repository](https://github.com/jimparis/qr-font)

Similar Articles

Jim's TrueType QR Code Font

Hacker News Top

Jim Paris releases an experimental TrueType OpenType font that renders bracket-delimited text as QR codes while keeping surrounding text readable, using OpenType shaping and Reed-Solomon encoding.

QR code generator

Simon Willison's Blog

A QR code generator tool with customizable styling options, built with Claude's help. Supports URLs, text, and WiFi network codes.

Show HN: An ASCII 3D Rendering Engine

Hacker News Top

GlyphCSS is a JavaScript library that renders textured 3D meshes in the DOM using ASCII characters, supporting various 3D formats and integrating with vanilla JS, React, and Vue.