Skip to main content

Command line tool to visually compare two fonts.

Project description

Overview

fontdiff is a tool to visually compare differences between two fonts by displaying character atlases overlaid. You run it and it just shows you the differences. It spits out PNGs or dynamic SVGs, and you can customise the output a bit.

Install

You can just quickly install fontdiff with pip:

pip install fontdiff

Alternatively, you can clone the repo and simply run fontdiff.py as a script, or even place a symlink of fontdiff.py to your preferred bin directory. However, you may need to install all dependencies using pip first if you haven't done so already.

git clone https://github.com/derVedro/fontdiff.git
cd fontdiff/fontdiff
chmod +x fontdiff.py
ln -s $PWD/fontdiff.py ~/bin/fontdiff

Usage Examples

# regular usage
fontdiff fontA.ttf fontB.ttf

# you can use some predefined char sets
fontdiff fontA.ttf fontB.ttf +greek +numerals

# or even try more options
fontdiff --cell-size 30 --chars "abcde1234!@#$" fontA.ttf fontB.ttf

# save result as file
fontdiff fontA.ttf fontB.ttf > diff.png

# SVG output
fontdiff -s fontA.ttf fontB.ttf

# consider to check all the possible options
fontdiff --help

Dependencies

  • python ≥3.11
  • pillow ≥10.1.0
  • skia-pathops ≥0.8.0.post1
  • ziafont ≥0.11
  • numpy (optional)

Miscellaneous

You can configure fontdiff by putting a toml config file into $XDG_CONFIG_HOME/fontdiff/ or $HOME/.fontdiff/ directory. An example configuration file is provided in this repository. It's worth taking a look into if you need additional functionality like extra character sets, setting sizes or colors.

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

fontdiff-0.3.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

fontdiff-0.3.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file fontdiff-0.3.0.tar.gz.

File metadata

  • Download URL: fontdiff-0.3.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fontdiff-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2469f9aadd16bd34ff3e9b5473c4d5f1fb3956436ef64982c5b990d61d60dbda
MD5 3f4d9c6b000e0771a7e05529c76323c2
BLAKE2b-256 5cae82748fa30cbc79f8a47362f8e10379910293a7fef6ccd92a8aa997e50229

See more details on using hashes here.

File details

Details for the file fontdiff-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fontdiff-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fontdiff-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc0ed89515ea569edbd721353b2c005fc56a31c0ec2ba6ebe2da3d8cb4eb813a
MD5 85c6ead8fd09dc2557e7ff56140af432
BLAKE2b-256 7b4f5cbd0cc9977179527d45d9066f68482a2a97b2e8e8dffa1723b86c4fb4fb

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