From 4da8f43eeb1e5ad6eb2a3288633392a46f8e3a33 Mon Sep 17 00:00:00 2001 From: ReadRoberts Date: Tue, 6 Mar 2018 17:36:57 -0800 Subject: [PATCH] [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. --- Lib/fontTools/varLib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/fontTools/varLib/__init__.py b/Lib/fontTools/varLib/__init__.py index 9d1038c07..b9b751976 100644 --- a/Lib/fontTools/varLib/__init__.py +++ b/Lib/fontTools/varLib/__init__.py @@ -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: