From 51ffcba1b66e5134e926e373e002bb838094977e Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Fri, 30 Aug 2024 07:59:24 +0200 Subject: [PATCH 1/2] Take discrete axes into account when checking for feature compatibility --- Lib/ufo2ft/_compilers/baseCompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/ufo2ft/_compilers/baseCompiler.py b/Lib/ufo2ft/_compilers/baseCompiler.py index d1b6c1fd..413481f4 100644 --- a/Lib/ufo2ft/_compilers/baseCompiler.py +++ b/Lib/ufo2ft/_compilers/baseCompiler.py @@ -326,9 +326,9 @@ def _compileNeededSources(self, designSpaceDoc): # If the feature files are compatible between the sources, we can save # time by building a variable feature file right at the end. - can_optimize_features = self.variableFeatures and _featuresCompatible( - designSpaceDoc - ) + can_optimize_features = self.variableFeatures and all( + _featuresCompatible(doc) for doc in interpolableSubDocs + ) if can_optimize_features: self.logger.info("Features are compatible across masters; building later") From de46064f1357c9ae7dc9735e9b540d6151eb403a Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 2 Sep 2024 11:08:19 +0200 Subject: [PATCH 2/2] Fix formatting --- Lib/ufo2ft/_compilers/baseCompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/ufo2ft/_compilers/baseCompiler.py b/Lib/ufo2ft/_compilers/baseCompiler.py index 413481f4..2e877a63 100644 --- a/Lib/ufo2ft/_compilers/baseCompiler.py +++ b/Lib/ufo2ft/_compilers/baseCompiler.py @@ -328,7 +328,7 @@ def _compileNeededSources(self, designSpaceDoc): # time by building a variable feature file right at the end. can_optimize_features = self.variableFeatures and all( _featuresCompatible(doc) for doc in interpolableSubDocs - ) + ) if can_optimize_features: self.logger.info("Features are compatible across masters; building later")