Simple configuration-based font-hinting tools, especially for Windows.
Project description
windhint
Configuration-driven batch font hinting for TrueType (.ttf) fonts, powered by ttfautohint.
Installation
pip install windhint
# or
uv tool install windhint
Quick Start
# 1. Generate a configuration template
windhint --init
# 2. Edit windhint.yaml — set your input and output directories
# 3. Run
windhint
Configuration Reference
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
input-dir |
string | Yes | — | Directory containing .ttf fonts to hint |
output-dir |
string | Yes | — | Directory where hinted fonts will be written |
windows-compatibility |
boolean | No | true |
Add blue zones for usWinAscent and usWinDescent to avoid clipping |
fallback-stem-width |
integer | No | 50 |
Fallback stem width at 2048 UPEM |
hinting-range-min |
integer | No | 8 |
Minimum PPEM value for hint sets |
hinting-range-max |
integer | No | 50 |
Maximum PPEM value for hint sets |
hinting-limit |
integer | No | 200 |
Switch off hinting above this PPEM value; 0 means no limit |
increase-x-height |
integer | No | 14 |
Increase x-height for 6 ≤ PPEM ≤ N; 0 disables |
stem-width-mode |
string | No | "sss" |
Stem width mode: three letters of n (natural), q (quantized), s (strong) |
Example Configuration
input-dir: ./fonts/source
output-dir: ./fonts/hinted
windows-compatibility: true
fallback-stem-width: 50
hinting-range-min: 8
hinting-range-max: 50
hinting-limit: 200
increase-x-height: 14
stem-width-mode: sss
How It Works
windhint walks input-dir recursively, finds all .ttf files, mirrors the directory structure under output-dir, and invokes ttfautohint on each file with the parameters from your configuration. A progress bar shows the current file being processed.
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file windhint-0.3.0.tar.gz.
File metadata
- Download URL: windhint-0.3.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8198d28c4b9f89d52089288d12ed7d9412b89ee867dd8d447194affe1e907913
|
|
| MD5 |
98d9b76bed5e47361b22a51c7f5883c0
|
|
| BLAKE2b-256 |
83f7fbccba8e8ecf16ba166cce36e574120825a710aad908c1c383bab958d115
|
File details
Details for the file windhint-0.3.0-py3-none-any.whl.
File metadata
- Download URL: windhint-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
081dc3c7ebe6d788be0a1588eb8cae03d6d27e2fbe21c9f057ed56ba0c0061b4
|
|
| MD5 |
7efb3e4811841fddb2d7cf8371356200
|
|
| BLAKE2b-256 |
5672a7ec46cb516280fd9e7928f0f2fd9cd028d311aa1b255038de83d48386fa
|