Open justvanrossum opened 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.
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).
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.
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.
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:min < default < max
, then the range is -1.0 to +1.0min == default and default < max
, then the range is 0.0 to +1.0min < default and default == max
, then the range is -1.0 to 0.0At the
VarC
level, we don't deal with user coordinates anymore, but we may need to specify how to clamp interpolated designspace coordinates.