Fontspector is a command-line tool for checking the quality of font projects. It is a Rust port of fontbakery, and is currently at an early alpha stage.
- OpenType profile: 45/53 checks ported (85%)
- Universal profile: 81/138 checks ported (59%)
- Google Fonts profile: 84/157 checks ported (53%)
Fontspector is made up of multiple crates:
fontbakery-bridge
: Allows Python fontbakery checks to run inside fontspectorfontspector-checkapi
: Defines the API and utility functions for check implementationsfontspector-checkhelper
: Procedural macros to facilitate check implementationsfontspector-cli
: The main fontspector executablefontspector-py
: A Python module exposing fontspector (for which see below)fontspector-web
: A WASM implementation of fontspector (for which see below)profile-testplugin
: An example of a runtime-loadable test profileprofile-googlefonts
,profile-opentype
,profile-universal
: Built in profiles and their check implementations
We export the Fontspector check runner to a Python module, and then use
pytest
to run (a modified version of) the fontbakery test suite. To
do this:
pip3 install -U maturin
cd fontspector-py
python3 -m venv venv ; . venv/bin/activate
maturin develop
pytest
Fontspector also has a WASM-based web version at https://simoncozens.github.io/fontspector
It is built and deployed from Github Actions, but should you need to rebuild this manually for development, run:
cd fontspector-web
wasm-pack build
cd www; npm install; npm run build
The results appear in ../docs/
. Note that this requires Rust version
1.81 or older.