From 6ad7f807506188c7d39b15048fcec6f0dfab835e Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Wed, 4 Oct 2023 12:23:58 +0100 Subject: [PATCH] Only set primary script if we know it (#746) --- Lib/gftools/scripts/add_font.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/gftools/scripts/add_font.py b/Lib/gftools/scripts/add_font.py index eb03b26dc..9ffd82f17 100755 --- a/Lib/gftools/scripts/add_font.py +++ b/Lib/gftools/scripts/add_font.py @@ -169,7 +169,7 @@ def _MakeMetadata(args, is_new): subsets = ['menu'] + subsets_in_font with ttLib.TTFont(file_family_style_weights[0][0]) as ttfont: script = primary_script(ttfont) - if script not in ("Latn", "Cyrl", "Grek",): + if script is not None and script not in ("Latn", "Cyrl", "Grek",): metadata.primary_script = script metadata.license = font_license