Skip to content

Commit

Permalink
Update category names, allow descriptions (#853)
Browse files Browse the repository at this point in the history
* Update category names, allow descriptions

* Don't require ufomerge for this test

* Don't build variable, it requires hb-subset
  • Loading branch information
simoncozens authored Mar 13, 2024
1 parent ddb743f commit 5e1cb5c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 15 deletions.
36 changes: 30 additions & 6 deletions Lib/gftools/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class GFTags(object):
"Medieval",
"Brush/Marker",
"Pixel",
"Brush",
],
"Arabic": [
"Kufi",
Expand All @@ -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": [
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 1 addition & 7 deletions data/test/builder/recipeprovider_noto/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
],
)
],
Expand Down

0 comments on commit 5e1cb5c

Please sign in to comment.