Commit 464d7aa2 authored by Nikolaus Waxweiler's avatar Nikolaus Waxweiler

Instantiator: use source.font if not None, else load

parent a11e3b62
Pipeline #72458 passed with stage
in 2 minutes and 11 seconds
......@@ -66,10 +66,13 @@ class Instantiator:
glyph_names: Set[str] = set()
for source in designspace.sources:
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())
if source.font is not None:
glyph_names.update(source.font.keys())
else:
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())
# Construct Variators
axis_bounds: Dict[str, Tuple[float, float, float]] = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment