It takes an input TOML file and a bunch of fonts and outputs a JSON file that the check com.google.fonts/check/shaping/regression can use.
Use like: python -m fontbakery.update_shaping_tests input.toml output.json path/to/*.ttf.
Things that are not implemented:
Collidoscope testing and forbidden glyphs
Things that could be implemented:
Basic itemizer for text runs? Harfbuzz won't do itemization by itself, so you can freely mix scripts and have whatever the font contains applied to it, even if the glyphs would never be next to each other in a run in an application. I think diffenator2 has an algorithm we can steal.
Setting shaping parameters (features, language, ...) for each text string instead of just globally
Make it faster. The original tool used uharfbuzz directly and updates a suite of 178 tests in 11 seconds on my machine, here the VHarfbuzz-based implementation takes 47 seconds.
Description
This implements https://github.com/fonttools/fontbakery/discussions/4589. This is more a basic tool than a final implementation, to get some eyes on it.
It takes an input TOML file and a bunch of fonts and outputs a JSON file that the check
com.google.fonts/check/shaping/regression
can use.Use like:
python -m fontbakery.update_shaping_tests input.toml output.json path/to/*.ttf
.Things that are not implemented:
Things that could be implemented:
Todo:
Checklist
CHANGELOG.md