-
Notifications
You must be signed in to change notification settings - Fork 8
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
Variable Components for COLRv1 #277
Comments
Ty for the sketch. Do we have any sense of how this model compares in size to VarC?
I immediately wonder if you want the option to offset from global as well as to just replace. |
Not yet: we can't build trial fonts without 32-bit VarStore in fonttools (fonttools/fonttools#2279).
As a distinct feature, this hasn't occurred to me. But the effect can be achieved with the "override" behavior: the variable component can itself be variable on that axis, and override the value for the same axis for the referenced glyph, effectively remapping the axis. |
I hope to have enough by end of today to unblock you.
Not really. The variation of this value provides that. |
This should get you going: fonttools/fonttools#2279 |
Fantastic, @behdad, thank you! |
Nit: we should spell out behavior if multiple coordinates specify the same axisIndex. |
Perhaps it's better to disallow it. I don't see how it is useful. |
Disallowing is typically too harsh. Call it undefined if same axis is set multiple times to different values. And spec the array as sorted on |
(So I don't forget) In playing with the test font changing the array of coordinates to an array of offset24 to coordinate resulted in 15+% reduction in filesize because while the full set of coordinates was often unique each individual one often wasn't. |
I tried prototyping this. The FontTools side was simple: The HarfBuzz side however is proving to be impossible to implement given our abstractions. I'll try to elaborate more on the issue: |
In short A: Variable Components are components which can specify the variation space location for the glyph they reference.
In short B: it's similar to Smart Components in Glyphs.
As some of you know, I've been working with @JeremieHornus / @BlackFoundryCom on a proposal to add "Variable Components" to OpenType:
We've since found out that this idea has a lot in common with COLRv1 (as discussed in #88), and are now exploring the idea of proposing to add Variable Components to COLRv1.
Our idea currently is to add
PaintLocation
, which specifies an array of(axisIndex, axisValue)
pairs, and a correspondingPaintVarLocation
, whereaxisValue
is variable.Here's a very quick sketch of what these new Paints could look like:
The values in the
coordinates
array override the global variation space location coordinates. Axis values for axes not referenced in thecoordinates
array are left alone.I hope this is a good start for further discussion.
The text was updated successfully, but these errors were encountered: