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(), } ) ), diff --git a/Lib/gftools/scripts/gen_stat.py b/Lib/gftools/scripts/gen_stat.py index 1a4c73806..7feb6216e 100755 --- a/Lib/gftools/scripts/gen_stat.py +++ b/Lib/gftools/scripts/gen_stat.py @@ -63,11 +63,13 @@ def main(args=None): ) args = parser.parse_args(args) - print(args.fonts) fonts = [TTFont(f) for f in args.fonts] 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)