-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[avar
2] Enable non-orthogonal axis distortions
#14
Comments
There's no further requirements on the mapping. The mapping is NOT required to be reversible. The pre-normalization/post-normalization to be determined / documented. |
I suggested using varation math on So if I understand your proposal correctly, these deltas are n-D vectors in normalized variation space, with linear response when 1 axis is non-default, quadratic response when 2 axes are non-default, cubic response when 3 axes are non-default, etc. As you say, normalization is to be determined. What about behaviour if the vector causes a transition across 0 on any axis? Maybe that’s fine. |
On further thought: Let's use a This also removes the 16bit limit on the number of axes, conceptually. I also wanted to say let's borrow from how we extended COLRv1, and instead of going to major 2, go to major 1 minor 1, such that older implementations can use older representation still. While we can do that, it has some inconvenience because the old representation has to be parsed before new representation can be found. Still, I'm supportive of possibly doing it that way.
|
Axis values are normalized to -1,+1 based on There is a functional requirement that if all input axes are at their |
Or rather, the functional requirement is that: if all input axes are at their |
No no no.
Except that each dimension's deltas is separately encoded.
Correct. Same non-linearity that we enable across the system.
I tried to address that in my previous two comments. |
How can you keep axes separate if an arbitrary location in n-space maps to another arbitrary location in n-space? |
Each output axis is a piecewise-linear function of all input axes. Imagine a point rotating in HOI. Both output X and Y are functions of both input X and Y, but you can represent/encode them separately. |
I don’t follow you. With 2 |
Now I don't follow you either. Let's get on VC. |
avar
2]avar
2] Enable non-orthogonal axis distortions
avar
2] Enable non-orthogonal axis distortionsavar
2] Enable non-orthogonal axis distortions
There's no requirement that if all input axes are at default, then all output axes must be at zero. This would allow moving default freely. See: #17 (comment) We can declare fonts with |
Will google/fonts#2981 (comment) be supported? |
Yes. No such constraints. |
Apple's VF version of SF Pro just dropped last week, with similar VF axes to Roboto Serif, https://v-fonts.com/fonts/sf-pro The grade axis isn't "safe" with the weight axis; a good case study for avar2 :) |
Nice comments from @tiroj at https://twitter.com/TiroTypeworks/status/1524085630367506432 |
After some more thinking I decided it might be better to retain avar1 fields that do a linear per-axis mapping first, then do the full-matrix mapping. I also sketched a simple designspace-file xml that implements wght axis HOI: |
So this is the new avar table format I'm proposing, in fonttools otData format:
|
Note this VarIdxMap is called DeltaSetIndexMap in the OT spec. |
Here's sample script to generate avar2 table from RobotoFlex relationships between wght/wdth/opsz axes and its parametric axes: |
The code for this is in HarfBuzz 5.0.0, and a FreeType patch is in: https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/188 A sample font file (RobotoFlex) is in: https://drive.google.com/file/d/1fcb9pyt6P7tDOnMf7AaTK4B7Apt4P1mK/view The wght, wdth, and opsz axes are routed through avar2. |
I'm drafting a spec for this here: |
This is complete. |
Update: the aim of this proposal is just to enable non-orthogonal axes distortions. The higher-order interpolation will come by way of
ItemVariationStore
upgrades, via eg. #17Update: Settled on the following format:
If version is
0x00020000
, the format1-like struct is followed by the following fields:The text was updated successfully, but these errors were encountered: