googlefonts / fontc

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Apache License 2.0
76 stars 13 forks source link

[ttx_diff] Initial refactor for machine-readable output #860

Closed cmyr closed 2 months ago

cmyr commented 3 months ago

This splits the generating of the different objects that we compare (ttx tables and layout_normalizer output) from the printing of them, which is the first step towards not printing them.

There is one little addition: it now prints a % representing the diff ratio when two outputs differ.


Thinking about what we'll want for the bulk compiler, I realize maybe it's more significantly different than I had thought at first? Basically I'm wondering if, when we're called from the bulk compiler we shouldn't just return some kind of JSON summary that just lists the tables and their difference ratio, and we shouldn't really bother writing all the individual files to disk, since it's all going to be nuked on the next font anyway?