From 5e1cb5c5587b327e76337be10679c7934da55380 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Wed, 13 Mar 2024 10:24:56 +0000 Subject: [PATCH] Update category names, allow descriptions (#853) * Update category names, allow descriptions * Don't require ufomerge for this test * Don't build variable, it requires hb-subset --- Lib/gftools/tags.py | 36 +++++++++++++++---- .../builder/recipeprovider_noto/config.yaml | 8 +---- tests/test_builder.py | 4 +-- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Lib/gftools/tags.py b/Lib/gftools/tags.py index e68854c4..7871816c 100644 --- a/Lib/gftools/tags.py +++ b/Lib/gftools/tags.py @@ -61,6 +61,7 @@ class GFTags(object): "Medieval", "Brush/Marker", "Pixel", + "Brush", ], "Arabic": [ "Kufi", @@ -82,15 +83,15 @@ class GFTags(object): "Chrieng (Khmer)", ], "Sinhala": [ - "Traditional/High contrast", - "Contemporary/High contrast", + "Traditional", + "Contemporary", "Low contrast", ], "Indic": [ - "Traditional/High contrast", - "Contemporary/High contrast", + "Traditional", + "Contemporary", "Low contrast", - "Sign Painting/vernacular", + "Sign Painting", "Reverse-contrast", ], "Simplicity": [ @@ -130,6 +131,29 @@ class GFTags(object): "Emojis", "Symbols", ], + "Expressive": [ + "Business", + "Sincere", + "Loud", + "Vintage", + "Calm", + "Calm/simple", + "Stiff", + "Competent", + "Happy", + "Childlike", + "Excited", + "Playful", + "Awkward", + "Innovative", + "Rugged", + "Futuristic", + "Artistic", + "Cute", + "Fancy", + "Sophisticated", + "Active", + ] } def __init__(self): @@ -164,7 +188,7 @@ def _parse_csv(self, data, skip_rows=[], skip_columns=[], family_name_col=0): # If no tag exists for a value, it means a value has been assigned # to the whole group such as Sans, Sans Serif etc. We don't want to # include these since we can deduce it ourselves according to Evan. - sub_category = data[1][j] + sub_category = data[1][j].split("\n")[0] if sub_category == "": continue if category not in self.CATEGORIES: diff --git a/data/test/builder/recipeprovider_noto/config.yaml b/data/test/builder/recipeprovider_noto/config.yaml index f560f16e..2a82b310 100644 --- a/data/test/builder/recipeprovider_noto/config.yaml +++ b/data/test/builder/recipeprovider_noto/config.yaml @@ -5,10 +5,4 @@ autohintTTF: false autohintOTF: false recipeProvider: noto googleFonts: true -includeSubsets: -- from: Noto Sans Devanagari - layoutHandling: closure - force: true - ranges: - - start: 0x900 - end: 0x97F +buildVariable: false \ No newline at end of file diff --git a/tests/test_builder.py b/tests/test_builder.py index a34f919f..06c90c6c 100644 --- a/tests/test_builder.py +++ b/tests/test_builder.py @@ -49,8 +49,8 @@ ( os.path.join(TEST_DIR, "recipeprovider_noto"), [ - os.path.join("TestFamily", "unhinted", "slim-variable-ttf", "TestFamily[wght].ttf"), - os.path.join("TestFamily", "googlefonts", "variable", "TestFamily[wght].ttf") + os.path.join("TestFamily", "unhinted", "ttf", "TestFamily-Regular.ttf"), + os.path.join("TestFamily", "googlefonts", "ttf", "TestFamily-Black.ttf"), ], ) ],