From 3b527a5667c4b1b3e6d3dd1a248a6054e98cd5fb Mon Sep 17 00:00:00 2001 From: Ricky Atkins Date: Thu, 30 Jul 2026 17:18:24 +0100 Subject: [PATCH 1/3] gftools-gen-stat: allow src to be a builder config --- Lib/gftools/scripts/gen_stat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/gftools/scripts/gen_stat.py b/Lib/gftools/scripts/gen_stat.py index 1a4c73806..8cdf7e9f5 100755 --- a/Lib/gftools/scripts/gen_stat.py +++ b/Lib/gftools/scripts/gen_stat.py @@ -68,6 +68,9 @@ def main(args=None): if args.src: config = yaml.load(open(args.src), Loader=yaml.SafeLoader) + # If there's a top-level item called stat in the config (which there may + # be if we're injesting a full builder config.yaml), use that + config = config.get("stat", config) gen_stat_tables_from_config(config, fonts) else: gen_stat_tables(fonts) From 9205adf4708278739658fd9ea6aaff1264bc55ab Mon Sep 17 00:00:00 2001 From: Ricky Atkins Date: Thu, 30 Jul 2026 17:18:24 +0100 Subject: [PATCH 2/3] Allow STAT flags to be hex integers --- Lib/gftools/builder/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/gftools/builder/schema.py b/Lib/gftools/builder/schema.py index 4d2476f7b..f762f9617 100644 --- a/Lib/gftools/builder/schema.py +++ b/Lib/gftools/builder/schema.py @@ -7,6 +7,7 @@ MapPattern, Str, Int, + HexInt, Float, Seq, Optional, @@ -45,7 +46,7 @@ Optional("linkedValue"): Int() | Float(), Optional("rangeMinValue"): Int() | Float(), Optional("rangeMaxValue"): Int() | Float(), - Optional("flags"): Int(), + Optional("flags"): Int() | HexInt(), } ) ), From 6570a7b061e5007a6ad6b59d69ae8cb2adbdc09f Mon Sep 17 00:00:00 2001 From: Ricky Atkins Date: Thu, 30 Jul 2026 17:18:24 +0100 Subject: [PATCH 3/3] Remove debug print --- Lib/gftools/scripts/gen_stat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/gftools/scripts/gen_stat.py b/Lib/gftools/scripts/gen_stat.py index 8cdf7e9f5..7feb6216e 100755 --- a/Lib/gftools/scripts/gen_stat.py +++ b/Lib/gftools/scripts/gen_stat.py @@ -63,7 +63,6 @@ def main(args=None): ) args = parser.parse_args(args) - print(args.fonts) fonts = [TTFont(f) for f in args.fonts] if args.src: