VF: Base master not found
See original GitHub issueI’ve run into this error, but I’m not sure where it originates from. A VF won’t build because of Base master not found
, traceback below.
The build in question is here: https://github.com/yanone/Arima-Font/blob/master/sources/builder.yaml using gftools builder sources/builder.yaml
The Glyphs 3 source has a VF Origin set to Thin, and a Thin instance exists, and it reflects in the auto-generated .designspace
file as the wght
axis’ default
value:
<axes>
<axis tag="wght" name="Weight" minimum="100" maximum="700" default="100">
<map input="100" output="30"/>
<map input="200" output="45"/>
<map input="300" output="65"/>
<map input="400" output="90"/>
<map input="500" output="103"/>
<map input="600" output="135"/>
<map input="700" output="160"/>
</axis>
</axes>
So as far as I’m concerned, the data is complete (but I’m not the biggest VF expert).
I’ve had the locations
printed after this line, which yields once [{}, {'wght': 1.0}]
and once [{'wght': 1.0}]
which then triggers the error because of a missing {}
. This is as far as I could analyze it, but now I need to ask for help. What is going on here?
Thank you.
The full traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/fontmake/font_project.py", line 980, in run_from_designspace
self._run_from_designspace_interpolatable(
File "/usr/local/lib/python3.9/site-packages/fontmake/font_project.py", line 1063, in _run_from_designspace_interpolatable
self.build_variable_font(
File "/usr/local/lib/python3.9/site-packages/fontmake/font_project.py", line 338, in build_variable_font
font = ufo2ft.compileVariableTTF(
File "/usr/local/lib/python3.9/site-packages/ufo2ft/__init__.py", line 554, in compileVariableTTF
varfont = varLib.build(
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/__init__.py", line 926, in build
_merge_OTL(vf, model, master_fonts, axisTags)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/__init__.py", line 619, in _merge_OTL
merger.mergeTables(font, master_fonts, ['GSUB', 'GDEF', 'GPOS'])
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 139, in mergeTables
self.mergeThings(font[tag], [m[tag] if tag in m else None
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1044, in mergeThings
super(VariationMerger, self).mergeThings(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 127, in mergeThings
self.mergeObjects(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 102, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1044, in mergeThings
super(VariationMerger, self).mergeThings(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 127, in mergeThings
self.mergeObjects(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 102, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1044, in mergeThings
super(VariationMerger, self).mergeThings(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 127, in mergeThings
self.mergeObjects(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 102, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1044, in mergeThings
super(VariationMerger, self).mergeThings(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 129, in mergeThings
self.mergeLists(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 112, in mergeLists
self.mergeThings(value, values)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1044, in mergeThings
super(VariationMerger, self).mergeThings(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 125, in mergeThings
mergerFunc(self, out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 833, in merge
merger.mergeLists(self.SubTable, subtables)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 112, in mergeLists
self.mergeThings(value, values)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1044, in mergeThings
super(VariationMerger, self).mergeThings(out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 125, in mergeThings
mergerFunc(self, out, lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 653, in merge
_MarkBasePosFormat1_merge(self, lst, merger)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 635, in _MarkBasePosFormat1_merge
merger.mergeThings(anchor, allAnchors)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/merger.py", line 1041, in mergeThings
model, lst = masterModel.getSubModel(lst)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/models.py", line 239, in getSubModel
subModel = VariationModel(subList(key, self.origLocations), self.axisOrder)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/models.py", line 223, in __init__
keyFunc = self.getMasterLocationsSortKeyFunc(locations, axisOrder=self.axisOrder)
File "/usr/local/lib/python3.9/site-packages/fontTools/varLib/models.py", line 246, in getMasterLocationsSortKeyFunc
raise VariationModelError("Base master not found.")
fontTools.varLib.errors.VariationModelError: Base master not found.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/yanone/Code/py/git/gftools/bin/gftools-builder.py", line 83, in <module>
builder.build()
File "/Users/yanone/Code/py/git/gftools/Lib/gftools/builder/__init__.py", line 183, in build
self.build_variable()
File "/Users/yanone/Code/py/git/gftools/Lib/gftools/builder/__init__.py", line 283, in build_variable
output_files = self.run_fontmake(source, args)
File "/Users/yanone/Code/py/git/gftools/Lib/gftools/builder/__init__.py", line 320, in run_fontmake
FontProject().run_from_glyphs(source, **args)
File "/usr/local/lib/python3.9/site-packages/fontmake/font_project.py", line 718, in run_from_glyphs
self.run_from_designspace(designspace_path, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fontmake/font_project.py", line 994, in run_from_designspace
raise FontmakeError(
fontmake.errors.FontmakeError: In 'Arima.glyphs' -> 'master_ufo/Arima.designspace': Generating fonts from Designspace failed: Base master not found.
Issue Analytics
- State:
- Created 2 years ago
- Comments:25 (9 by maintainers)
Top GitHub Comments
It’s ufo2ft being “clever”.
There’s a part of ufo2ft’s MarkFeatureWriter which guesses whether an anchor belongs to an abvm or a blwm feature. But it doesn’t think about variable fonts when it does this guessing. It does it on a master-by-master basis. What’s happening here is that although the anchors are source compatible, there’s an anchor which, by means of this guessing process, is ending up in the abvm feature of one master and the blwm of another.
The partial solution is to improve the guessing algorithm. The correct solution, as I will rant at length to anyone who will listen, is to give up on the whole build-multiple-fonts-and-merge-them approach and build fonts variable-first.
Simon merged his fix, so I’m closing this issue. Thanks everyone