From 587b0fbf115dea2302e86c81aacbf245621ea32d Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 7 Mar 2023 17:26:08 +0000 Subject: [PATCH] [varLib] don't overwrite existing feaLib-built 'STAT' table Fixes https://github.com/googlefonts/fontmake/issues/985 and https://github.com/googlefonts/ufo2ft/issues/723 --- Lib/fontTools/varLib/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/fontTools/varLib/__init__.py b/Lib/fontTools/varLib/__init__.py index 77b4f4112..8aa15c791 100644 --- a/Lib/fontTools/varLib/__init__.py +++ b/Lib/fontTools/varLib/__init__.py @@ -995,11 +995,11 @@ def build_many( vf = build( vfDoc, master_finder, - exclude=list(exclude) + ["STAT"], + exclude=exclude, optimize=optimize, colr_layer_reuse=colr_layer_reuse, )[0] - if "STAT" not in exclude: + if "STAT" not in vf and "STAT" not in exclude: buildVFStatTable(vf, designspace, name) res[name] = vf return res