pillow-yaff
YAFF bitmap font support for Pillow, as a standalone package that requires no changes to Pillow itself.
YAFF is a human-readable bitmap font format supporting proportional glyph widths and per-glyph kerning.
pillow-yaff provides a font object that implements the same duck-typed
interface Pillow's own font classes do (getbbox, getlength, getmask,
getmask2), so it can be passed directly as the font= argument to
PIL.ImageDraw or PIL.ImageText on an unmodified, pip-installed Pillow.
Usage
import pillow_yaff
from PIL import Image, ImageDraw
font = pillow_yaff.load("my_font.yaff")
im = Image.new("RGB", (100, 30), "white")
draw = ImageDraw.Draw(im)
draw.text((5, 5), "Hello", fill="black", font=font)
im.save("out.png")
pillow_yaff.load() accepts a path (str, bytes, or os.PathLike) or an
open binary file object.
Requirements
- Pillow >= 12.0.0 (needs
PIL.ImageText) - Python >= 3.10
Development
pip install -e .[test]
pytest
CI (.github/workflows/test.yml) runs the test suite on Python 3.10-3.14
across Linux/macOS/Windows on every push and pull request, and builds the
sdist/wheel to catch packaging errors early.
Metadata
Release files for pillow-yaff 0.1.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 | |
|---|---|---|---|
| pillow_yaff-0.1.0.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pillow_yaff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / pillow_yaff-0.1.0.tar.gz
| Download URL | pillow_yaff-0.1.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e16732f81d4780542645e64fc1dcb154923cf028c1c1a0c6ffd13ba6016ff0b0
|
|
BLAKE2b-256 checksum How to use checksums |
3ebc80ef5e462d4d8627a37676da85534b765e600423b26ac5561ac856468234
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 27, 2026.
Transparency logRelease files / pillow_yaff-0.1.0-py3-none-any.whl
| Download URL | pillow_yaff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71f6537aac7c2e1af3785726bc7d87dbbf651fe263157bd63ec16cf0692aa262
|
|
BLAKE2b-256 checksum How to use checksums |
34b2582ca379210444b95006f32463346d104b6ee1919595df685732a006d47f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 27, 2026.
Transparency log