From 4d011a3da2bff2560dc20acaa5aeaa9fa452a084 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Thu, 31 Oct 2024 12:22:51 -0400 Subject: [PATCH] [fontc] Set --no-production-names --- Lib/gftools/builder/fontc.py | 4 ++++ Lib/gftools/builder/operations/fontc/__init__.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Lib/gftools/builder/fontc.py b/Lib/gftools/builder/fontc.py index ad389e01..9d951554 100644 --- a/Lib/gftools/builder/fontc.py +++ b/Lib/gftools/builder/fontc.py @@ -52,6 +52,10 @@ def modify_config(self, config: dict): config["buildWebfont"] = False config["buildSmallCap"] = False config["splitItalic"] = False + # set --no-production-names, because it's easier to debug + extra_args = config.get("extraFontmakeArgs") or "" + extra_args += " --no-production-names" + config["extraFontmakeArgs"] = extra_args # override config to turn not build instances if we're variable if self.will_build_variable_font(config): config["buildStatic"] = False diff --git a/Lib/gftools/builder/operations/fontc/__init__.py b/Lib/gftools/builder/operations/fontc/__init__.py index a0f06b6e..e25cad2a 100644 --- a/Lib/gftools/builder/operations/fontc/__init__.py +++ b/Lib/gftools/builder/operations/fontc/__init__.py @@ -51,6 +51,8 @@ def rewrite_one_arg(args: List[str]) -> str: else: # glue the filter back together for better reporting below next_ = f"{next_} {filter_}" + elif next_ == "--no-production-names": + return next_ else: raise ValueError(f"unknown fontmake arg '{next_}'") return ""