GitHub - jimparis/qr-font: A QR code generator in a TrueType font: https://qr.jim.sh/ · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
jimparis
qr-font
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star<br>91
master
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>25 Commits<br>25 Commits
.github/workflows
.github/workflows
tools
tools
.gitignore
.gitignore
AGENTS.md
AGENTS.md
LICENSE-OFL.txt
LICENSE-OFL.txt
Makefile
Makefile
NOTICE.md
NOTICE.md
README.md
README.md
design.md
design.md
pyproject.toml
pyproject.toml
uv.lock
uv.lock
View all files
Repository files navigation
Jim's TrueType QR Code Font
Live Demo: https://qr.jim.sh/
Downloads:
qrfont-1L.ttf (21x21 modules, up to 17 characters)
qrfont-2L.ttf (25x25 modules, up to 32 characters)
qrfont-3L.ttf (29x29 modules, up to 53 characters)
This repo generates an experimental OpenType font that turns bracket-delimited<br>text into a QR Code symbol while leaving surrounding text readable.
abc[hello]ghi
All fonts use:
Byte mode
Printable ASCII input
Fixed mask pattern 0
[ and ] as delimiters
The fonts are generated rather than hand-authored. The build script emits glyph<br>outlines and GSUB feature logic, then compiles them into dist/qrfont-*.ttf.<br>The default build compiles the delimiter parser, byte expansion, Reed-Solomon<br>parity circuit, QR module placement, and fixed mask rendering.
Printable ASCII glyphs are copied from Liberation Sans Regular, scaled into the<br>QR Font em square, so text outside bracketed QR blocks renders as ordinary text<br>in the same font. Liberation is a reserved font name under the source font<br>license, so the generated families are named QR Font 1-L, QR Font 2-L, and QR Font 3-L.
Build
make
The project uses uv for Python dependency management. You can also run the<br>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<br>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].<br>Mixed text such as abc[def]ghi should render as normal text, then a QR code<br>for def, then normal text.
License
The generated font is a Modified Version of Liberation Sans Regular and is<br>licensed under the SIL Open Font License, Version 1.1. See<br>LICENSE-OFL.txt and NOTICE.md.
Notes
This is a proof-of-concept font. It relies on OpenType shaping, so it needs an<br>environment that applies GSUB features to the font. Inputs inside a QR block<br>are bounded to printable ASCII, up to 17, 32, or 53 characters depending on the<br>selected font version.
About
A QR code generator in a TrueType font: https://qr.jim.sh/
Resources
Readme
License
View license
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
91<br>stars
Watchers
watching
Forks
forks
Report repository
Releases
v1.0.0
Latest
Jun 28, 2026
Packages
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Python<br>99.0%
Makefile<br>1.0%
You can’t perform that action at this time.