From b7249cd33f4629719b55076dc3e47893ffb7ecc1 Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Fri, 25 Aug 2023 11:50:28 -0500 Subject: [PATCH 01/14] BLED custom axis added --- Lib/axisregistry/data/bleed.textproto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Lib/axisregistry/data/bleed.textproto diff --git a/Lib/axisregistry/data/bleed.textproto b/Lib/axisregistry/data/bleed.textproto new file mode 100644 index 000000000..3cee5d83f --- /dev/null +++ b/Lib/axisregistry/data/bleed.textproto @@ -0,0 +1,17 @@ +# BLED based on https://github.com/jenskutilek/homecomputer-fonts +tag: "BLED" +display_name: "Bleed" +min_value: 0 +default_value: 0 +max_value: 100 +precision: 0 +fallback { + name: "Default" + value: 0.0 +} +fallback_only: false +description: + "Bleed adjusts the overall darkness in the typographic color of strokes or other forms, without" + " any changes in overall width, line breaks, or page layout. Negative values make the font appearance" + " lighter, while positive values make it darker, similarly to ink bleed or dot gain on paper, commonly" + " seen in printed and typewritten materials." \ No newline at end of file From 90f171d129cc51130eabfe9db42463744706e20a Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Fri, 25 Aug 2023 16:14:55 -0500 Subject: [PATCH 02/14] SCAN custom axis added --- Lib/axisregistry/data/scanlines.textproto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Lib/axisregistry/data/scanlines.textproto diff --git a/Lib/axisregistry/data/scanlines.textproto b/Lib/axisregistry/data/scanlines.textproto new file mode 100644 index 000000000..087ef7fc3 --- /dev/null +++ b/Lib/axisregistry/data/scanlines.textproto @@ -0,0 +1,17 @@ +# SCAN based on https://github.com/jenskutilek/homecomputer-fonts +tag: "SCAN" +display_name: "Scanlines" +min_value: -100 +default_value: 0 +max_value: 100 +precision: 0 +fallback { + name: "Default" + value: 0 +} +fallback_only: false +description: + "Break up shapes into horizontal segments without any changes in overall width, inter-letter spacing," + " or kerning, so there are no line breaks or page layout changes. Negative values" + " cause the glyphs to become visually segmented, while positive values may cause + " the segments to overlap and create a bold effect." \ No newline at end of file From 0f5e530970cd4a87ff88ddb0b623e5f1b21a882b Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Fri, 25 Aug 2023 17:01:19 -0500 Subject: [PATCH 03/14] formatting fix --- Lib/axisregistry/data/scanlines.textproto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/axisregistry/data/scanlines.textproto b/Lib/axisregistry/data/scanlines.textproto index 087ef7fc3..7d0ced056 100644 --- a/Lib/axisregistry/data/scanlines.textproto +++ b/Lib/axisregistry/data/scanlines.textproto @@ -11,7 +11,7 @@ fallback { } fallback_only: false description: - "Break up shapes into horizontal segments without any changes in overall width, inter-letter spacing," - " or kerning, so there are no line breaks or page layout changes. Negative values" - " cause the glyphs to become visually segmented, while positive values may cause - " the segments to overlap and create a bold effect." \ No newline at end of file + "Break up shapes into horizontal segments without any changes in overall width," + " letter spacing, or kerning, so there are no line breaks or page layout changes." + " Negative values cause the glyphs to become visually segmented, while positive" + " values may cause the segments to overlap and create a bold effect." \ No newline at end of file From af12fcc30424b3f589315814f025a0f9e1ff5b6e Mon Sep 17 00:00:00 2001 From: Yanone Date: Wed, 13 Sep 2023 14:45:52 +0200 Subject: [PATCH 04/14] Create shadow.textproto --- Lib/axisregistry/data/shadow.textproto | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Lib/axisregistry/data/shadow.textproto diff --git a/Lib/axisregistry/data/shadow.textproto b/Lib/axisregistry/data/shadow.textproto new file mode 100644 index 000000000..4b45df850 --- /dev/null +++ b/Lib/axisregistry/data/shadow.textproto @@ -0,0 +1,13 @@ +# SHDW based on https://github.com/EkType/Honk +tag: "SHDW" +display_name: "Shadow" +min_value: 0 +default_value: 100 +max_value: 1000 +precision: 0 +fallback { + name: "Default" + value: 100 +} +fallback_only: false +description: "Adjust the extrusion depth of a shadowed font." From fdb4e19af5f8152ff9c0e68333f58588178902e2 Mon Sep 17 00:00:00 2001 From: Yanone Date: Fri, 22 Sep 2023 14:18:58 +0200 Subject: [PATCH 05/14] Update shadow.textproto --- Lib/axisregistry/data/shadow.textproto | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Lib/axisregistry/data/shadow.textproto b/Lib/axisregistry/data/shadow.textproto index 4b45df850..7e22442e1 100644 --- a/Lib/axisregistry/data/shadow.textproto +++ b/Lib/axisregistry/data/shadow.textproto @@ -1,13 +1,13 @@ -# SHDW based on https://github.com/EkType/Honk -tag: "SHDW" -display_name: "Shadow" -min_value: 0 -default_value: 100 -max_value: 1000 -precision: 0 +# SHLN based on https://github.com/EkType/Honk +tag: "SHLN" +display_name: "Shadow Length" +min_value: 0.0 +default_value: 50.0 +max_value: 100.0 +precision: -1 fallback { name: "Default" value: 100 } fallback_only: false -description: "Adjust the extrusion depth of a shadowed font." +description: "Adjust the length of a shadowed font." From fd6a73be6975f9310124718d971447a8e8e0b6cc Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Fri, 22 Sep 2023 15:49:21 -0500 Subject: [PATCH 06/14] Rename shadow.textproto to shadow_length.textproto --- .../data/{shadow.textproto => shadow_length.textproto} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Lib/axisregistry/data/{shadow.textproto => shadow_length.textproto} (100%) diff --git a/Lib/axisregistry/data/shadow.textproto b/Lib/axisregistry/data/shadow_length.textproto similarity index 100% rename from Lib/axisregistry/data/shadow.textproto rename to Lib/axisregistry/data/shadow_length.textproto From 0d876c2f0c692535f47d13825aadd21003596b1b Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 3 Oct 2023 11:13:53 +0100 Subject: [PATCH 07/14] If we delete a name STAT was using, put it back --- Lib/axisregistry/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Lib/axisregistry/__init__.py b/Lib/axisregistry/__init__.py index 30278fa91..29b437fb2 100644 --- a/Lib/axisregistry/__init__.py +++ b/Lib/axisregistry/__init__.py @@ -437,6 +437,7 @@ def build_static_name_table(ttFont, family_name, style_name): name_table = ttFont["name"] name_table.removeNames(platformID=1) existing_name = ttFont["name"].getBestFamilyName() + removed_names = {} names = {} is_ribbi = ( @@ -455,6 +456,7 @@ def build_static_name_table(ttFont, family_name, style_name): 21, 22, ): + removed_names[name_id] = name_table.getDebugName(name_id) name_table.removeNames(nameID=name_id) else: style_tokens = style_name.split() @@ -477,8 +479,18 @@ def build_static_name_table(ttFont, family_name, style_name): names[(NameID.TYPOGRAPHIC_SUBFAMILY_NAME, 3, 1, 0x409)] = style_name # we do not use WWS names since we use the RIBBI naming schema for name_id in (21, 22): + removed_names[name_id] = name_table.getDebugName(name_id) name_table.removeNames(nameID=name_id) + # If STAT table was using any removed names, add then back with a new ID + if "STAT" in ttFont and removed_names: + for av in ttFont["STAT"].table.AxisValueArray.AxisValue: + if av.ValueNameID in removed_names: + av.ValueNameID = name_table.addMultilingualName({"en": removed_names[av.ValueNameID]}) + for av in ttFont["STAT"].table.DesignAxisRecord.Axis: + if av.AxisNameID in removed_names: + av.AxisNameID = name_table.addMultilingualName({"en": removed_names[av.AxisNameID]}) + names[(NameID.UNIQUE_FONT_IDENTIFIER, 3, 1, 0x409)] = _updateUniqueIdNameRecord( ttFont, {k[0]: v for k, v in names.items()}, (3, 1, 0x409) ) From cec39118ca563be554962e519ff558d7a29ef62b Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 3 Oct 2023 11:42:32 +0100 Subject: [PATCH 08/14] Black --- Lib/axisregistry/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/axisregistry/__init__.py b/Lib/axisregistry/__init__.py index 29b437fb2..552809224 100644 --- a/Lib/axisregistry/__init__.py +++ b/Lib/axisregistry/__init__.py @@ -486,10 +486,14 @@ def build_static_name_table(ttFont, family_name, style_name): if "STAT" in ttFont and removed_names: for av in ttFont["STAT"].table.AxisValueArray.AxisValue: if av.ValueNameID in removed_names: - av.ValueNameID = name_table.addMultilingualName({"en": removed_names[av.ValueNameID]}) + av.ValueNameID = name_table.addMultilingualName( + {"en": removed_names[av.ValueNameID]} + ) for av in ttFont["STAT"].table.DesignAxisRecord.Axis: if av.AxisNameID in removed_names: - av.AxisNameID = name_table.addMultilingualName({"en": removed_names[av.AxisNameID]}) + av.AxisNameID = name_table.addMultilingualName( + {"en": removed_names[av.AxisNameID]} + ) names[(NameID.UNIQUE_FONT_IDENTIFIER, 3, 1, 0x409)] = _updateUniqueIdNameRecord( ttFont, {k[0]: v for k, v in names.items()}, (3, 1, 0x409) From 8bc90c4037cb618c7f66395ab912a480df6c19d8 Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Wed, 4 Oct 2023 18:35:56 -0500 Subject: [PATCH 09/14] Update project ref in sharpness.textproto --- Lib/axisregistry/data/sharpness.textproto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/axisregistry/data/sharpness.textproto b/Lib/axisregistry/data/sharpness.textproto index c12217ad9..6b12c33ee 100644 --- a/Lib/axisregistry/data/sharpness.textproto +++ b/Lib/axisregistry/data/sharpness.textproto @@ -1,4 +1,4 @@ -#SHRP based on https://github.com/monokromskriftforlag/geologisk/ +#SHRP based on https://github.com/googlefonts/geologica tag: "SHRP" display_name: "Sharpness" min_value: 0 From c65e1a8e4a03eaeba6943c2cfea96449b9167f3f Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Thu, 19 Oct 2023 11:54:19 -0500 Subject: [PATCH 10/14] shadow_length.textproto description updated --- Lib/axisregistry/data/shadow_length.textproto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/axisregistry/data/shadow_length.textproto b/Lib/axisregistry/data/shadow_length.textproto index 7e22442e1..f43a4aa8c 100644 --- a/Lib/axisregistry/data/shadow_length.textproto +++ b/Lib/axisregistry/data/shadow_length.textproto @@ -10,4 +10,6 @@ fallback { value: 100 } fallback_only: false -description: "Adjust the length of a shadowed font." +description: + "Adjusts the font's shadow length from no shadow visible (0 %)" + " to a maximum shadow applied (100%) relative to each family design." From 200528a7b9b4cfaa30a74f354cbad8ca82f1ba74 Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Thu, 19 Oct 2023 11:57:05 -0500 Subject: [PATCH 11/14] shadow_length.textproto default fix --- Lib/axisregistry/data/shadow_length.textproto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/axisregistry/data/shadow_length.textproto b/Lib/axisregistry/data/shadow_length.textproto index f43a4aa8c..45a46ae20 100644 --- a/Lib/axisregistry/data/shadow_length.textproto +++ b/Lib/axisregistry/data/shadow_length.textproto @@ -7,7 +7,7 @@ max_value: 100.0 precision: -1 fallback { name: "Default" - value: 100 + value: 50.0 } fallback_only: false description: From 56f4f568e609902551b49c090bf5474e1fcdefdb Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Wed, 25 Oct 2023 15:15:48 -0500 Subject: [PATCH 12/14] scanlines.textproto description updated Taking what we agreed on last week --- Lib/axisregistry/data/scanlines.textproto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/axisregistry/data/scanlines.textproto b/Lib/axisregistry/data/scanlines.textproto index 7d0ced056..15a809b7b 100644 --- a/Lib/axisregistry/data/scanlines.textproto +++ b/Lib/axisregistry/data/scanlines.textproto @@ -13,5 +13,4 @@ fallback_only: false description: "Break up shapes into horizontal segments without any changes in overall width," " letter spacing, or kerning, so there are no line breaks or page layout changes." - " Negative values cause the glyphs to become visually segmented, while positive" - " values may cause the segments to overlap and create a bold effect." \ No newline at end of file + " Negative values make the scanlines thinner, and positive values make them thicker." From 6718c0855f02c1cbe2e8fa49e732a0aa0836e5dd Mon Sep 17 00:00:00 2001 From: Viviana Monsalve Date: Wed, 25 Oct 2023 15:19:45 -0500 Subject: [PATCH 13/14] bleed.textproto description update Following what we agreed on last meeting --- Lib/axisregistry/data/bleed.textproto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/axisregistry/data/bleed.textproto b/Lib/axisregistry/data/bleed.textproto index 3cee5d83f..ed8abb81a 100644 --- a/Lib/axisregistry/data/bleed.textproto +++ b/Lib/axisregistry/data/bleed.textproto @@ -13,5 +13,4 @@ fallback_only: false description: "Bleed adjusts the overall darkness in the typographic color of strokes or other forms, without" " any changes in overall width, line breaks, or page layout. Negative values make the font appearance" - " lighter, while positive values make it darker, similarly to ink bleed or dot gain on paper, commonly" - " seen in printed and typewritten materials." \ No newline at end of file + " lighter, while positive values make it darker, similarly to ink bleed or dot gain on paper." From 0672debfa4034c3f0dd99ef338f38fabf0e03bdf Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Wed, 8 Nov 2023 12:47:52 +0000 Subject: [PATCH 14/14] Don't fail if there are no axis values --- Lib/axisregistry/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Lib/axisregistry/__init__.py b/Lib/axisregistry/__init__.py index 552809224..09f8a3024 100644 --- a/Lib/axisregistry/__init__.py +++ b/Lib/axisregistry/__init__.py @@ -484,11 +484,12 @@ def build_static_name_table(ttFont, family_name, style_name): # If STAT table was using any removed names, add then back with a new ID if "STAT" in ttFont and removed_names: - for av in ttFont["STAT"].table.AxisValueArray.AxisValue: - if av.ValueNameID in removed_names: - av.ValueNameID = name_table.addMultilingualName( - {"en": removed_names[av.ValueNameID]} - ) + if ttFont["STAT"].table.AxisValueArray: + for av in ttFont["STAT"].table.AxisValueArray.AxisValue: + if av.ValueNameID in removed_names: + av.ValueNameID = name_table.addMultilingualName( + {"en": removed_names[av.ValueNameID]} + ) for av in ttFont["STAT"].table.DesignAxisRecord.Axis: if av.AxisNameID in removed_names: av.AxisNameID = name_table.addMultilingualName(