googlefonts / variable-components-spec

9 stars 0 forks source link

How to specify uniform x, y scaling #2

Open justvanrossum opened 3 years ago

justvanrossum commented 3 years ago

In component transformations, we define ScaleX and ScaleY. Ideally only one should value be required when x and y scale are the same.

There are three options (the default scale factor is 1.0):

  1. Each value needs to be specified if it's different from the default. So when x == y and x != default, both need to be specified (this is the current situation, as implented by rcjktools).

  2. If ScaleY is missing, it should default to whatever ScaleX is. Downside: need two values if x != default and y == default

  3. If ScaleY is missing, it should default to whatever ScaleX is if a certain flag has been set, else default to 1.0.

Option 3 is most compact, but perhaps it is trying too hard to solve a relatively rare case. It may not be worth the added complexity.

I'm leaning towards option 2.

behdad commented 2 years ago

I also like option two best. However then you get to the case where HaveScaleX is false but HaveScaleY is true and that's undefined. So the scheme needs to be renamed at least.