Update varLib to current designspace spec
See original GitHub issue@behdad, does varLib need to be updated to implement the current designspace spec? When building a variable font for Noto Sans Cherokee with fontmake, varLib crashes like this:
File "/home/sascha/src/fontmake/Lib/fontmake/font_project.py", line 200, in build_variable_font
font, _, _ = varLib.build(designspace_path, finder)
File "/home/sascha/src/fontmake/env/src/fonttools/Lib/fontTools/varLib/__init__.py", line 380, in build
model = models.VariationModel(master_locs)
File "/home/sascha/src/fontmake/env/src/fonttools/Lib/fontTools/varLib/models.py", line 137, in __init__
keyFunc = self.getMasterLocationsSortKeyFunc(locations, axisOrder=axisOrder)
File "/home/sascha/src/fontmake/env/src/fonttools/Lib/fontTools/varLib/models.py", line 148, in getMasterLocationsSortKeyFunc
assert {} in locations, "Base master not found."
AssertionError: Base master not found.
When compiling NotoSansCherokee, the locations
variable has the value [{u'wght': -1.0}, {u'wght': -1.0}, {u'wght': -0.7}]
, which seems a bit surprising given the generated designspace:
<?xml version='1.0' encoding='utf-8'?>
<designspace format="3">
<axes>
<axis default="400" maximum="900.0" minimum="100.0" name="weight" tag="wght">
<map input="100.0" output="26" />
<map input="200.0" output="39" />
<map input="300.0" output="58" />
<map input="400.0" output="90" />
<map input="500.0" output="108" />
<map input="600.0" output="128" />
<map input="700.0" output="151" />
<map input="800.0" output="169" />
<map input="900.0" output="190" />
<labelname xml:lang="en">Weight</labelname>
</axis>
</axes>
<sources>
<source familyname="Noto Sans Cherokee" filename="NotoSansCherokee-Light.ufo" name="Noto Sans Cherokee Light" stylename="Light">
<location>
<dimension name="weight" xvalue="26.000000" />
</location>
</source>
<source familyname="Noto Sans Cherokee" filename="NotoSansCherokee-Regular.ufo" name="Noto Sans Cherokee Regular" stylename="Regular">
<lib copy="1" />
<groups copy="1" />
<features copy="1" />
<info copy="1" />
<location>
<dimension name="weight" xvalue="90.000000" />
</location>
</source>
<source familyname="Noto Sans Cherokee" filename="NotoSansCherokee-Bold.ufo" name="Noto Sans Cherokee Bold" stylename="Bold">
<location>
<dimension name="weight" xvalue="190.000000" />
</location>
</source>
</sources>
<instances>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-Thin.ufo" name="Noto Sans Cherokee Thin" stylename="Thin">
<location>
<dimension name="weight" xvalue="26.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-ExtraLight.ufo" name="Noto Sans Cherokee ExtraLight" stylename="ExtraLight">
<location>
<dimension name="weight" xvalue="39.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-Light.ufo" name="Noto Sans Cherokee Light" stylename="Light">
<location>
<dimension name="weight" xvalue="58.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-Regular.ufo" name="Noto Sans Cherokee Regular" stylename="Regular">
<location>
<dimension name="weight" xvalue="90.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-Medium.ufo" name="Noto Sans Cherokee Medium" stylename="Medium">
<location>
<dimension name="weight" xvalue="108.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-SemiBold.ufo" name="Noto Sans Cherokee SemiBold" stylename="SemiBold">
<location>
<dimension name="weight" xvalue="128.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-Bold.ufo" name="Noto Sans Cherokee Bold" stylename="Bold">
<location>
<dimension name="weight" xvalue="151.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-ExtraBold.ufo" name="Noto Sans Cherokee ExtraBold" stylename="ExtraBold">
<location>
<dimension name="weight" xvalue="169.000000" />
</location>
<info />
<kerning />
</instance>
<instance familyname="Noto Sans Cherokee" filename="../instance_ufo/NotoSansCherokee-Black.ufo" name="Noto Sans Cherokee Black" stylename="Black">
<location>
<dimension name="weight" xvalue="190.000000" />
</location>
<info />
<kerning />
</instance>
</instances>
</designspace>
I won’t be able to fix this during the coming days (need to prepare for a Google committee; then a full day of committee meetings; then there’s the Easter holiday in Switzerland). So it would be great if @behdad or somebody else could look into this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:37 (23 by maintainers)
Top Results From Across the Web
designspaceLib: Read, write, and edit designspace files
Implements support for reading and manipulating designspace files. Allows the users to define axes, rules, sources, variable fonts and instances, and their ...
Read more >How do I find the current version of Design Space?
You can find the steps for each platform through the steps below: Note: The actual version number will change regularly as updates are...
Read more >Desktop Cricut Design Space Updates: October 2022
Cricut often makes changes and upgrades to the Cricut Design Space software. Here is a history of Cricut Design Space updates!
Read more >Designspace Theory - Superpolator
It defines the dimensions in which the typeface developes, for instance “weight”, “width”, or other things. A designspace also stores information about the ......
Read more >New Features in Cricut Design Space Update v7.5 ... - YouTube
Is the third time a charm for Design Space for Desktop Updates ? Version 7.5 was released on March 28. DId they get...
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
To be honest, I find this requirement the weakest part of the specification. Looking at https://github.com/googlei18n/fontmake/issues/167, @brawer summarizes:
For example, Light must be at wght=300, Regular at wght=400, Black at wght=900.
— this is going to be very difficult to enforce.Really, that’s exactly what my code does…