googlefonts / shaperglot

Test font files for language support
Apache License 2.0
29 stars 4 forks source link

Shaping_differs to allow >=2 items, added defs for nl_Latn and tr_Latn #38

Open yanone opened 7 months ago

yanone commented 5 months ago

I'm done with this. Please review the shaping_differs check carefully, because I still didn't fully get what the differs notation is about. But I believe that, from looking at the code alone, I properly translated it to allow >=2 items. For execute() I basically just created permutations and looped over them, leaving all other code unchanged.

There are now assert statements in execute() that assure input items to be >=2, with corresponding differs items, since I couldn't find any item count specifications in StrictYAML. You may want to have these error messages in another form and/or place.

yanone commented 5 months ago

I think actually we need to add a manually defined test for the change in the check (mostly the differs part), since there aren't any definitions using this notation yet. But I don't know how to define a test because I don't fully understand what's going on. Could you please contribute this?