[varLib] Fix bug in varLib.build() for CFF2.

The logic should attempt to build a cvar table only if there is a glyf table. This stack dumps when the font is a CFF2 font.
This commit is contained in:
ReadRoberts 2018-03-06 17:36:57 -08:00 committed by Cosimo Lupo
parent f3c06fba3f
commit 4da8f43eeb
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482

View File

@ -767,7 +767,7 @@ def build(designspace_filename, master_finder=lambda s:s, exclude=[], optimize=T
_merge_OTL(vf, model, master_fonts, axisTags)
if 'gvar' not in exclude and 'glyf' in vf:
_add_gvar(vf, model, master_fonts, optimize=optimize)
if 'cvar' not in exclude:
if 'cvar' not in exclude and 'glyf' in vf:
_merge_TTHinting(vf, model, master_fonts)
for tag in exclude: