adobe-type-tools / feature_file_change_review

Public review of tentative changes to the Adobe OpenType Feature File Format Specification
Apache License 2.0
0 stars 0 forks source link

required unit suffixes #5

Open schriftgestalt opened 4 hours ago

schriftgestalt commented 4 hours ago

Are those really needed? Normalized coordinates are always -1–1 and design values are almost always bigger. So it could be quite safely deduced. Why not relax the requirement to allow specifying normalized units by adding a n? (In python (and other languages) plain numbers are treated as 10base ints but you can specify different bases if need 0xFF, or 0o10). That would save a lot space (and make it easier to read).

skef commented 3 hours ago

Yes, we feel that axis units are needed. There was substantial discussion on the threads leading to this feature among people who did feel that only one of the three scales would suffice in feature files. However, there wasn't agreement on which scale was the right one (between user units and design units). People tend to think the choice is obvious, but it's not the job of the grammar to force a particular choice on authors. And there are corner cases in which it could be useful to directly specify the normalized value that will be used in the feature.

You can see in the "rejected ideas" section that we did consider adding a defaultAxisUnit directive, which would in effect allow an author to omit the axis unit of their choice. It was in the grammar at one point. We got feedback from early reviewers concerned that this would be confusing relative to its value.

That would save a lot space (and make it easier to read).

That rationale only applies for someone not using named locations. And a given locationDef directive with axis units is not particularly difficult to read.

The feature file for a typical variable font will reference a quite small number of locations that repeat over and over, and these are easy to give names. In other fonts there may be "one-off" locations, but then this kind of "efficiency" argument doesn't hold much weight.

This is probably the main reason why we felt it was OK to drop defaultAxisUnit: The worst thing you can do for readability of your feature file is repeat the same axis location list over and over across many directives as opposed to giving it a name and using that name.

schriftgestalt commented 35 minutes ago

I somehow missed the "u" suffix. With that, it does make sense.