You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to use the regression shaping tests in fontbakery, but found that writing and updating the JSON files by hand is tedious. Are there any plans on adding tooling for this?
If not, I had the idea of porting some existing tooling to output fontbakery-compatible JSON files instead. It consists of
A CLI tool that takes a bunch of TOML input files and transforms them into regression test expectations files,
and the TOML files themselves, which you edit by hand.
The split of input and output files makes it easier to edit what you'd like to see, because tests bigger than a couple of characters lead to big and unwieldy output, especially if you have more than a couple of fonts to check, or even fvar entries.
You would have a directory of input TOML files that look like this:
Note how features are global to all test strings. The comparison_mode keyword decides whether you are interested in the shaping output with (full) or without (glyphstream) positioning information. Then, for each string in the text list, you'd generate a fontbakery-side regression test for each font under test (using the only key). For variable fonts, you generate a test for each fvar-entry (using the only and variations keys) for each string. The TOML structure could also be improved a bit by e.g. allowing specific features for specific test strings.
The generated JSON file would then be rather big even on a medium-sized project.
If you find this agreeable, where should the transformation tool live? As a submodule somewhere in fontbakery? Alternatively, I can make this an external tool and workflow unrelated to fontbakery. Then it would be nice though to discuss what tooling you'd be willing to onboard, to make the regression testing workflow less tedious.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We'd like to use the regression shaping tests in fontbakery, but found that writing and updating the JSON files by hand is tedious. Are there any plans on adding tooling for this?
If not, I had the idea of porting some existing tooling to output fontbakery-compatible JSON files instead. It consists of
The split of input and output files makes it easier to edit what you'd like to see, because tests bigger than a couple of characters lead to big and unwieldy output, especially if you have more than a couple of fonts to check, or even fvar entries.
You would have a directory of input TOML files that look like this:
Note how features are global to all test strings. The
comparison_mode
keyword decides whether you are interested in the shaping output with (full
) or without (glyphstream
) positioning information. Then, for each string in thetext
list, you'd generate a fontbakery-side regression test for each font under test (using theonly
key). For variable fonts, you generate a test for each fvar-entry (using theonly
andvariations
keys) for each string. The TOML structure could also be improved a bit by e.g. allowing specific features for specific test strings.The generated JSON file would then be rather big even on a medium-sized project.
If you find this agreeable, where should the transformation tool live? As a submodule somewhere in fontbakery? Alternatively, I can make this an external tool and workflow unrelated to fontbakery. Then it would be nice though to discuss what tooling you'd be willing to onboard, to make the regression testing workflow less tedious.
Beta Was this translation helpful? Give feedback.
All reactions