googlefonts / googlefonts/fontmake

question/enhancement: how could I generate a variable font just for a subset of axis (and fixed for others)?

Open
#297 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

source: https://github.com/googlei18n/noto-source/blob/master/src/NotoSansEthiopic-MM.glyphs

when I compile it it has a fontmake AssertionError: ((5, [5, 5, 5, 5, 3, 3, 3, 3]), 'list', '.SubTable', 'Lookup', '[0]', 'list', '.Lookup', 'LookupList', '.LookupList', 'GPOS', '.table', 'table_G_P_O_S_')

Q1: what would I need to change in the sources to compile it?
Q2 (aka **enhancement request**): if I cannot change the sources how could I generate two variable fonts where variable axis would be weight but the width would be fixed at Condensed and Regular? IMHO, ability to specify a subset of variation capabilities would be very useful. Alternatively, this should be specified in the source as alternatives (i.e. this might be a Glyphs.app enhancement request). Possibly it might be very useful to keep the source in a single file even if some axis might not be interpolatable. Discussion with Glyphs.app developers might be useful (@schriftgestalt : what do you think?).

fontmake -g src/NotoSansEthiopic-MM.glyphs -o variable
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:glyphsLib:Parsing .glyphs file
INFO:glyphsLib:Casting parsed values
INFO:glyphsLib:Loading to UFOs
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-Light.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-Regular.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-SemiBold.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-Bold.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-CondensedLight.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-Condensed.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-CondensedSemiBold.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSansEthiopic-CondensedBold.ufo
INFO:fontmake.font_project:Building interpolation-compatible TTFs
INFO:fontmake.font_project:Converting curves compatibly
INFO:cu2qu.ufo:New spline lengths:
1: 18
2: 1262
3: 124

INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-Light
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 5)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-Regular
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 5)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-CondensedSemiBold
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-Condensed
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-SemiBold
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 5)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-CondensedBold
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-Bold
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 5)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 2, 'ItemName:', 'PairSet', 'ItemIndex:', 6)
INFO:fontmake.font_project:Saving TTF for NotoSansEthiopic-CondensedLight
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 1, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'PairSet', 'ItemIndex:', 0)
INFO:fontmake.font_project:Building variable font variable_ttf/NotoSansEthiopic-VF.ttf
INFO:fontTools.varLib:Internal master locations:
[{'weight': 26.0, 'width': 100.0},
{'weight': 90.0, 'width': 100.0},
{'weight': 151.0, 'width': 100.0},
{'weight': 190.0, 'width': 100.0},
{'weight': 26.0, 'width': 70.0},
{'weight': 90.0, 'width': 70.0},
{'weight': 151.0, 'width': 70.0},
{'weight': 190.0, 'width': 70.0}]
INFO:fontTools.varLib:Internal axis supports:
{'weight': [26.0, 90.0, 190.0], 'width': [70.0, 100.0, 100.0]}
INFO:fontTools.varLib:Normalized master locations:
[{'weight': -1.0, 'width': 0.0},
{'weight': 0.0, 'width': 0.0},
{'weight': 0.61, 'width': 0.0},
{'weight': 1.0, 'width': 0.0},
{'weight': -1.0, 'width': -1.0},
{'weight': 0.0, 'width': -1.0},
{'weight': 0.61, 'width': -1.0},
{'weight': 1.0, 'width': -1.0}]
INFO:fontTools.varLib:Index of base master: 1
INFO:fontTools.varLib:Building variable font
INFO:fontTools.varLib:Loading master fonts
INFO:fontTools.varLib:Generating fvar / avar
INFO:fontTools.varLib:Building variations tables
INFO:fontTools.varLib:Generating MVAR
INFO:fontTools.varLib: xhgt: OS/2.sxHeight [536, 536, 546, 552, 536, 536, 546, 552]
INFO:fontTools.varLib: stro: OS/2.yStrikeoutPosition [322, 322, 328, 331, 322, 322, 328, 331]
INFO:fontTools.varLib:Generating gvar
INFO:fontTools.varLib:Generating HVAR
INFO:fontTools.varLib:Merging OpenType Layout tables
Traceback (most recent call last):
File "/usr/local/bin/fontmake", line 9, in
load_entry_point('fontmake==1.2.4.dev0', 'console_scripts', 'fontmake')()
File "/usr/local/google/home/marekj/newrel/fontmake/Lib/fontmake/__main__.py", line 182, in main
project.run_from_glyphs(glyphs_path, **args)
File "/usr/local/google/home/marekj/newrel/fontmake/Lib/fontmake/font_project.py", line 379, in run_from_glyphs
designspace_path, instance_data=instance_data, **kwargs)
File "/usr/local/google/home/marekj/newrel/fontmake/Lib/fontmake/font_project.py", line 435, in run_from_designspace
interpolate_layout_from=interpolate_layout_from, **kwargs)
File "/usr/local/google/home/marekj/newrel/fontmake/Lib/fontmake/font_project.py", line 495, in run_from_ufos
self.build_variable_font(designspace_path)
File "/usr/local/google/home/marekj/newrel/fontmake/Lib/fontmake/font_project.py", line 228, in build_variable_font
font, _, _ = varLib.build(designspace_path, finder)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/__init__.py", line 576, in build
_merge_OTL(vf, model, master_fonts, axisTags, base_idx)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/__init__.py", line 384, in _merge_OTL
merger.mergeTables(font, master_fonts, axisTags, base_idx, ['GPOS'])
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 106, in mergeTables
self.mergeThings(font[tag], [m[tag] for m in master_ttfs])
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 93, in mergeThings
self.mergeObjects(out, lst)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 70, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 93, in mergeThings
self.mergeObjects(out, lst)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 70, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 93, in mergeThings
self.mergeObjects(out, lst)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 70, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 95, in mergeThings
self.mergeLists(out, lst)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 80, in mergeLists
self.mergeThings(value, values)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 91, in mergeThings
mergerFunc(self, out, lst)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 614, in merge
merger.mergeObjects(self, lst, exclude=exclude)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 70, in mergeObjects
mergerFunc(self, value, values)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 95, in mergeThings
self.mergeLists(out, lst)
File "/usr/local/google/home/marekj/newrel/fonttools/Lib/fontTools/varLib/merger.py", line 77, in mergeLists
assert all(count == len(v) for v in lst), (count, [len(v) for v in lst])
AssertionError: ((5, [5, 5, 5, 5, 3, 3, 3, 3]), 'list', '.SubTable', 'Lookup', '[0]', 'list', '.Lookup', 'LookupList', '.LookupList', 'GPOS', '.table', 'table_G_P_O_S_')

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.