diff --git a/Lib/gftools/builder/operations/instantiateUfo.py b/Lib/gftools/builder/operations/instantiateUfo.py index 94986bd40..11e00fe1f 100644 --- a/Lib/gftools/builder/operations/instantiateUfo.py +++ b/Lib/gftools/builder/operations/instantiateUfo.py @@ -59,6 +59,8 @@ def targets(self): def variables(self): vars = super().variables vars["args"] += " --ufo-structure=json " + if self.original["expandFeaturesToInstances"]: + vars["args"] += " --expand-features-to-instances " if self.first_source.is_glyphs: vars["args"] += f"--instance-dir {escape_path(str(self.instance_dir))}" else: diff --git a/Lib/gftools/builder/recipeproviders/googlefonts.py b/Lib/gftools/builder/recipeproviders/googlefonts.py index 4ab8a4961..64f48869d 100644 --- a/Lib/gftools/builder/recipeproviders/googlefonts.py +++ b/Lib/gftools/builder/recipeproviders/googlefonts.py @@ -57,6 +57,7 @@ "checkCompatibility": True, "overlaps": "booleanOperations", "splitItalic": True, + "expandFeaturesToInstances": True, } @@ -193,8 +194,6 @@ def fontmake_args(self, source, variable=False): args += " --keep-direction" if self.config.get("removeOutlineOverlaps") is False: args += " --keep-overlaps" - if self.config.get("expandFeaturesToInstances"): - args += " --expand-features-to-instances" if self.config.get("extraFontmakeArgs") is not None: args += " " + str(self.config["extraFontmakeArgs"]) if variable: @@ -340,6 +339,9 @@ def build_a_static(self, source: File, instance: InstanceDescriptor, output): "operation": "instantiateUfo", "instance_name": instancename, "glyphData": self.config.get("glyphData"), + "expandFeaturesToInstances": self.config.get( + "expandFeaturesToInstances" + ), } ) steps += (