[cantarell-fonts] (Amend last commit: shorten code)



commit c44e003ed64962660ff067d0a4249d988270eced
Author: Nikolaus Waxweiler <madigens gmail com>
Date:   Mon Apr 1 23:13:20 2019 +0100

    (Amend last commit: shorten code)

 scripts/instantiator.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/scripts/instantiator.py b/scripts/instantiator.py
index 1fb75846..d61d64c6 100644
--- a/scripts/instantiator.py
+++ b/scripts/instantiator.py
@@ -66,13 +66,11 @@ class Instantiator:
 
         glyph_names: Set[str] = set()
         for source in designspace.sources:
-            if source.font is not None:
-                glyph_names.update(source.font.keys())
-            else:
+            if source.font is None:
                 if not Path(source.path).exists():
                     raise ValueError(f"Source at path '{source.path}' not found.")
                 source.font = ufoLib2.Font.open(source.path, lazy=False)
-                glyph_names.update(source.font.keys())
+            glyph_names.update(source.font.keys())
 
         # Construct Variators
         axis_bounds: Dict[str, Tuple[float, float, float]] = {}


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