[varLib] 2D designspace with 6 masters creates wrong var font
See original GitHub issueThe enclosed designspace contains two axes, “FOOO” and “BARR”. There are masters at all four corners, as well as intermediate masters in the middle of the “BARR” axis at both “FOOO” master positions.
At FOOO=0 all is well. At FOOO=1, the resulting shape at BARR=0.5 is wrong, and does not match the master at that position.
Below is the complete gvar.
What is curious is that the FOOO=0 BARR=1 delta location is given as:
<coord axis="BARR" max="1.0" min="0.5" value="1.0"/>
yet the FOOO=1 BARR=1 delta location is given as:
<coord axis="FOOO" value="1.0"/>
<coord axis="BARR" value="1.0"/>
Note the missing (and therefore different) min
and max
values for “BARR”.
<gvar>
<version value="1"/>
<reserved value="0"/>
<glyphVariations glyph="uni0041">
<tuple>
<coord axis="FOOO" value="1.0"/>
<delta pt="0" x="50" y="-233"/>
<delta pt="1" x="-233" y="-50"/>
<delta pt="2" x="-50" y="233"/>
<delta pt="3" x="233" y="50"/>
<delta pt="4" x="0" y="0"/>
<delta pt="5" x="0" y="0"/>
<delta pt="6" x="0" y="233"/>
<delta pt="7" x="0" y="233"/>
</tuple>
<tuple>
<coord axis="BARR" max="1.0" min="0.0" value="0.5"/>
<delta pt="0" x="300" y="-21"/>
<delta pt="1" x="229" y="-50"/>
<delta pt="2" x="200" y="21"/>
<delta pt="3" x="271" y="50"/>
<delta pt="4" x="0" y="0"/>
<delta pt="5" x="0" y="0"/>
<delta pt="6" x="0" y="21"/>
<delta pt="7" x="0" y="21"/>
</tuple>
<tuple>
<coord axis="BARR" max="1.0" min="0.5" value="1.0"/>
<delta pt="0" x="500" y="0"/>
</tuple>
<tuple>
<coord axis="FOOO" value="1.0"/>
<coord axis="BARR" max="1.0" min="0.0" value="0.5"/>
<delta pt="0" x="190" y="64"/>
<delta pt="1" x="64" y="-190"/>
<delta pt="2" x="-190" y="-64"/>
<delta pt="3" x="-64" y="190"/>
<delta pt="4" x="0" y="0"/>
<delta pt="5" x="0" y="0"/>
<delta pt="6" x="0" y="-64"/>
<delta pt="7" x="0" y="-64"/>
</tuple>
<tuple>
<coord axis="FOOO" value="1.0"/>
<coord axis="BARR" value="1.0"/>
<delta pt="0" x="0" y="-125"/>
<delta pt="1" x="-125" y="0"/>
<delta pt="2" x="0" y="125"/>
<delta pt="3" x="125" y="0"/>
<delta pt="4" x="0" y="0"/>
<delta pt="5" x="0" y="0"/>
<delta pt="6" x="0" y="125"/>
<delta pt="7" x="0" y="125"/>
</tuple>
</glyphVariations>
</gvar>
If I manually edit the TTX so that last delta location contains min and max for BARR, to match the other BARR=1 delta location, and recompile, I get a font that works as expected.
Cc. @thundernixon
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Common confusion: why can't a designspace set axis defaults ...
Here's my best guess: it's logical that the default of each axis must be in a source, because... Variable fonts work by adding...
Read more >Error when exporting variable font's italic instances - Glyphs
That is normal. Masters are used to create the Designspace of VaribleFont. Actually with two masters you can only export a variable font...
Read more >Designspace Theory - Superpolator
This text is an introduction to designspace construction. ... The FontTools / varlib interpreter will try to fold everything into a variable font....
Read more >Visualizing design space in variable fonts - Alphabettes
We are creating two things at once: a tool for selecting the instances in our variable font, and a visual representation of the...
Read more >Working with multiple masters - TypeDrawers
Importantly, variable fonts place few limitations on the placement of masters in the design space. However, due to the math of vector ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, fixed. Sorry about that again.
Yes, thanks, @behdad!