Unifont Utils
This project provides a set of tools for working with the GNU Unifont.
See the documentation at Read the Docs for more information.
Installation
Install the package from PyPI using the following command:
pip install unifont-utils
Quick start
Load a GNU Unifont .hex file, edit a glyph and save the file:
from unifont_utils import Glyph, GlyphSet, print_glyph
glyphs = GlyphSet.load_hex_file("unifont.hex")
glyph = glyphs["0041"]
print(glyph.hex_str, glyph.width, glyph.unicode_name)
print_glyph(glyph)
glyphs.set_glyph(Glyph("E000", "00" * 16))
glyphs.save_hex_file("edited.hex")
The package is organized in layers:
| Module | Contents |
|---|---|
unifont_utils |
Core model: Glyph, GlyphSet, ColorScheme, patterns, print_glyph, print_diff |
unifont_utils.operations |
Merging, range and Hangul selection, statistics, diffs, rotation, combining circles |
unifont_utils.generators |
Code point boxes, Braille and Kinya glyphs, matching the GNU Unifont programs |
unifont_utils.formats |
Glyph and page images, BDF, GNU hexdraw text, TrueType/CFF OpenType, .hex checks |
unifont_utils.downloader |
Downloading official Unifont releases |
unifont_utils.cli |
The unifont-utils command |
from unifont_utils.formats import save_opentype, save_page_image
from unifont_utils.operations import select_range
latin = select_range(glyphs, "0020", "007E")
save_page_image(glyphs, "4E", "page.png")
save_opentype(latin, "latin.otf", font_format="otf")
Interactive terminal editing lives in the independent UniPie (unipie) project.
Command line
unifont-utils --help
unifont-utils download # The latest official release
unifont-utils hex query --path unifont.hex --code_point 0041 --pure
unifont-utils hex merge base.hex overrides.hex --output merged.hex
unifont-utils hex subset --path merged.hex --start 0020 --end 007E --output latin.hex
unifont-utils convert page hex2img --path unifont.hex --page 4E --output page.png
unifont-utils convert font export --path latin.hex --format otf --output latin.otf
unifont-utils generate filler --range E000 E0FF --output filler.hex
The hex group queries, edits, checks and processes .hex files. The convert group
handles images, unihex2bmp pages, BDF, hexdraw text and OpenType fonts. The generate
group creates glyphs by algorithm.
Development
The repository uses uv for locked environments and Ruff for linting and formatting:
uv sync --locked
uv run --locked pytest
uv run --locked ruff check .
uv run --locked ruff format --check .
The documentation lives in docs/, with Chinese pages in docs/zh and English pages in
docs/en. Preview both languages with:
uv sync --locked --group docs
uv run --locked mkdocs serve
License
The project is released under the GPL v3 License.
Unifont Utils
Copyright (C) 2024-2026 SkyEye_FAST
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Feedback
Please feel free to raise issues for any problems encountered or feature suggestions.
Pull requests are welcome.
Metadata
Release files for unifont-utils 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| unifont_utils-0.8.0.tar.gz | 158.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unifont_utils-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 210.0 kB
Release files / unifont_utils-0.8.0.tar.gz
| Download URL | unifont_utils-0.8.0.tar.gz |
|---|---|
| Size | 158.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
627d59598b8e2d82f17cef0aca0a91b58ceea38195aa0e9c1a138167b9549218
|
|
BLAKE2b-256 checksum How to use checksums |
83735baa8baed759969981fb97795c9adf52360500c7540d8d2c6f6bb5dfb30f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / unifont_utils-0.8.0-py3-none-any.whl
| Download URL | unifont_utils-0.8.0-py3-none-any.whl |
|---|---|
| Size | 51.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96f9fd6fea1a4081eae5344b5d69c0f10fd5d0765a9b57c21c54b240e1f86df4
|
|
BLAKE2b-256 checksum How to use checksums |
fd0f1588708a0299e2c30f46017c17fba7d250411b245cc3c75a13a37d1d6182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for unifont-utils 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for unifont_utils-0.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.