A QR code generator in a TrueType font: https://qr.jim.sh/
Python
520
25 commits
updated Jun 28, 2026
Live Demo: https://qr.jim.sh/
Downloads:
This repo generates an experimental OpenType font that turns bracket-delimited text into a QR Code symbol while leaving surrounding text readable.
abc[hello]ghi
All fonts use:
[ and ] as delimitersThe fonts are generated rather than hand-authored. The build script emits glyph
outlines and GSUB feature logic, then compiles them into dist/qrfont-*.ttf.
The default build compiles the delimiter parser, byte expansion, Reed-Solomon
parity circuit, QR module placement, and fixed mask rendering.
Printable ASCII glyphs are copied from Liberation Sans Regular, scaled into the
QR Font em square, so text outside bracketed QR blocks renders as ordinary text
in the same font. Liberation is a reserved font name under the source font
license, so the generated families are named QR Font 1-L, QR Font 2-L, and QR Font 3-L.
make
The project uses uv for Python dependency management. You can also run the
generator directly with:
uv run tools/build_font.py
By default the generator reads Liberation Sans Regular from:
/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf
Use a different compatible TrueType source with:
uv run tools/build_font.py --base-font /path/to/BaseFont-Regular.ttf
To try the full generated Reed-Solomon circuit:
make full-parity
This is also the default make path. It emits thousands of contextual lookups
and usually takes noticeably longer than a layout-only build.
For a faster layout-only build with placeholder zero parity:
make fast-placeholder
To inspect the shaped glyph stream:
uv run tools/shape_debug.py '[a]' '[b]'
Outputs:
dist/qrfont-*.ttf (1-L, 2-L, and 3-L font files)dist/index.html (interactive web demo)build/qrfont-*.fea (generated OpenType feature files)Open dist/index.html in a browser and type bracketed text such as [hello].
Mixed text such as abc[def]ghi should render as normal text, then a QR code
for def, then normal text.
The generated font is a Modified Version of Liberation Sans Regular and is
licensed under the SIL Open Font License, Version 1.1. See
LICENSE-OFL.txt and NOTICE.md.
This is a proof-of-concept font. It relies on OpenType shaping, so it needs an environment that applies GSUB features to the font. Inputs inside a QR block are bounded to printable ASCII, up to 17, 32, or 53 characters depending on the selected font version.
(top 24 of 41)
4,599 followers · starred Jul 2026
2,275 followers · starred Jul 2026
261 followers · starred Jul 2026
274 followers · starred Jul 2026
A QR code generator in a TrueType font: https://qr.jim.sh/
Python
520
25 commits
updated Jun 28, 2026
Live Demo: https://qr.jim.sh/
Downloads:
This repo generates an experimental OpenType font that turns bracket-delimited text into a QR Code symbol while leaving surrounding text readable.
abc[hello]ghi
All fonts use:
[ and ] as delimitersThe fonts are generated rather than hand-authored. The build script emits glyph
outlines and GSUB feature logic, then compiles them into dist/qrfont-*.ttf.
The default build compiles the delimiter parser, byte expansion, Reed-Solomon
parity circuit, QR module placement, and fixed mask rendering.
Printable ASCII glyphs are copied from Liberation Sans Regular, scaled into the
QR Font em square, so text outside bracketed QR blocks renders as ordinary text
in the same font. Liberation is a reserved font name under the source font
license, so the generated families are named QR Font 1-L, QR Font 2-L, and QR Font 3-L.
make
The project uses uv for Python dependency management. You can also run the
generator directly with:
uv run tools/build_font.py
By default the generator reads Liberation Sans Regular from:
/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf
Use a different compatible TrueType source with:
uv run tools/build_font.py --base-font /path/to/BaseFont-Regular.ttf
To try the full generated Reed-Solomon circuit:
make full-parity
This is also the default make path. It emits thousands of contextual lookups
and usually takes noticeably longer than a layout-only build.
For a faster layout-only build with placeholder zero parity:
make fast-placeholder
To inspect the shaped glyph stream:
uv run tools/shape_debug.py '[a]' '[b]'
Outputs:
dist/qrfont-*.ttf (1-L, 2-L, and 3-L font files)dist/index.html (interactive web demo)build/qrfont-*.fea (generated OpenType feature files)Open dist/index.html in a browser and type bracketed text such as [hello].
Mixed text such as abc[def]ghi should render as normal text, then a QR code
for def, then normal text.
The generated font is a Modified Version of Liberation Sans Regular and is
licensed under the SIL Open Font License, Version 1.1. See
LICENSE-OFL.txt and NOTICE.md.
This is a proof-of-concept font. It relies on OpenType shaping, so it needs an environment that applies GSUB features to the font. Inputs inside a QR block are bounded to printable ASCII, up to 17, 32, or 53 characters depending on the selected font version.
(top 24 of 41)
4,599 followers · starred Jul 2026
2,275 followers · starred Jul 2026
261 followers · starred Jul 2026
274 followers · starred Jul 2026