Skip to main content

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

CLI Options

Option Description
--init Generate a windhint.yaml configuration template
-f, --force Overwrite existing hinted fonts instead of skipping them

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.

By default, fonts that already exist in output-dir are skipped — use --force to overwrite them.

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

windhint-0.4.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

windhint-0.4.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file windhint-0.4.0.tar.gz.

File metadata

  • Download URL: windhint-0.4.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","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

Hashes for windhint-0.4.0.tar.gz
Algorithm Hash digest
SHA256 da77f1464a3f70f4cfbfc5f5f598e29025374f3cd701b215bbcb20fdd0603801
MD5 1d04bcc0dd53a5b16c8e97c89e83eff9
BLAKE2b-256 91c30698ae744aba89adcab561694e4c33fbf6650efd9edaf9f107b10234e2d3

See more details on using hashes here.

File details

Details for the file windhint-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: windhint-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","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

Hashes for windhint-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c6a09221762ae82e7f91d74f652149b35c275fad61ac8c728219df4e9d65a04
MD5 25d1c6614e4e85a2e9799ee629eaee5e
BLAKE2b-256 a3ce89c919f6d731b57a6a599ed060763f8e9d52d9b130db517624d99d131c4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page