googlefonts / variable-components-spec

9 stars 0 forks source link

Can an internal axis have a normalized range between -1.0 and +1.0, or are we tied to 0.0 and 1.0? #3

Open justvanrossum opened 3 years ago

justvanrossum commented 3 years ago

How does our design of reusable axes affect the normalized range of an axis, and does it matter?

Normalized axis values are between -1.0 and +1.0, but can be limited based on the fvar user values:

At the VarC level, we don't deal with user coordinates anymore, but we may need to specify how to clamp interpolated designspace coordinates.

justvanrossum commented 3 years ago

We could require that fonts themselves should make sure that the interpolated local designspace values cannot be out of bounds, but that feels a bit wrong.

justvanrossum commented 3 years ago

Perhaps clamping between -1.0 and +1.0 is good enough, even for axes that don't go below 0.

varLib behaves correctly with such clamping (it simply doesn't apply a delta if the scalar is not between 0 and 1, or something to that effect).

behdad commented 2 years ago

Perhaps clamping between -1.0 and +1.0 is good enough, even for axes that don't go below 0.

That's what I do in avar2 proposal, clamp to -1..+1.

Lorp commented 2 years ago

I raised this issue in respect of avar2. In that case, the only practical disadvantage of sticking to a simple -1..+1 seems to be that a polyfill would not be able to generate all the possibilities that the font is capable of in an avar2 environment. That doesn’t seem like a reason to forbid fonts that exploit the technique.