[cantarell-fonts/ufo-conversion] Add public.skipExportGlyphs



commit 05a386fb0694ad4f1a5d74fc1ab9144be7158987
Author: Nikolaus Waxweiler <madigens gmail com>
Date:   Mon Mar 25 23:03:28 2019 +0000

    Add public.skipExportGlyphs

 scripts/instantiator.py   |  9 +++++++++
 src/Cantarell.designspace | 17 +++++++++++++++++
 2 files changed, 26 insertions(+)
---
diff --git a/scripts/instantiator.py b/scripts/instantiator.py
index 840226e8..4ebb99ba 100644
--- a/scripts/instantiator.py
+++ b/scripts/instantiator.py
@@ -49,6 +49,7 @@ class Instantiator:
     info_mutator: "Variator"
     kerning_mutator: "Variator"
     round_geometry: bool
+    skip_export_glyphs: List[str]
 
     @classmethod
     def from_designspace(
@@ -109,6 +110,12 @@ class Instantiator:
             default_source.font.lib,
         )
 
+        # The list of glyphs not to export and decompose where used as a component is
+        # supposed to be taken from the Designspace when a Designspace is used as the
+        # starting point of the compilation process. It should be exported to all
+        # instance libs, where the ufo2ft compilation functions will pick it up.
+        skip_export_glyphs = designspace.lib.get("public.skipExportGlyphs", [])
+
         return cls(
             copy_feature_text,
             copy_groups,
@@ -119,6 +126,7 @@ class Instantiator:
             info_mutator,
             kerning_mutator,
             round_geometry,
+            skip_export_glyphs,
         )
 
     def generate_instance(
@@ -154,6 +162,7 @@ class Instantiator:
                 setattr(font.info, attribute, getattr(self.copy_info, attribute))
         for key, value in self.copy_lib.items():
             font.lib[key] = value
+        font.lib["public.skipExportGlyphs"] = self.skip_export_glyphs
         for key, value in self.copy_groups.items():
             font.groups[key] = value
         font.features.text = self.copy_feature_text
diff --git a/src/Cantarell.designspace b/src/Cantarell.designspace
index a50a0aec..6bd0e92a 100644
--- a/src/Cantarell.designspace
+++ b/src/Cantarell.designspace
@@ -259,6 +259,23 @@
           <string>67</string>
         </dict>
       </dict>
+      <key>public.skipExportGlyphs</key>
+      <array>
+        <string>_bar-cy</string>
+        <string>_bottomhook</string>
+        <string>_commaaccent</string>
+        <string>_currencyvstem</string>
+        <string>_descender-cy.case.straight</string>
+        <string>_descenderreverse-cy.case</string>
+        <string>_descenderreversed-cy</string>
+        <string>_o.numero</string>
+        <string>_slash.zero</string>
+        <string>_slash.zero.osf</string>
+        <string>_typoquote</string>
+        <string>hryvnia</string>
+        <string>tenge</string>
+        <string>tugrik</string>
+      </array>
     </dict>
   </lib>
 </designspace>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]