diff --git a/Lib/ufo2ft/instantiator.py b/Lib/ufo2ft/instantiator.py index 067eb1ff..fcc7f973 100644 --- a/Lib/ufo2ft/instantiator.py +++ b/Lib/ufo2ft/instantiator.py @@ -251,7 +251,7 @@ def from_designspace( do_glyphs=True, ): """Instantiates a new data class from a Designspace object.""" - if designspace.default is None: + if designspace.findDefault() is None: raise InstantiatorError(_error_msg_no_default(designspace)) if any(hasattr(axis, "values") for axis in designspace.axes): diff --git a/tests/instantiator_test.py b/tests/instantiator_test.py index 6112db20..fa673310 100644 --- a/tests/instantiator_test.py +++ b/tests/instantiator_test.py @@ -71,7 +71,6 @@ def test_default_groups_only(ufo_module, data_dir, caplog): d.addSourceDescriptor(location={"Weight": 300}, font=ufo_module.Font()) d.addSourceDescriptor(location={"Weight": 900}, font=ufo_module.Font()) d.addInstanceDescriptor(styleName="2", location={"Weight": 400}) - d.findDefault() d.sources[0].font.groups["public.kern1.GRK_alpha_alt_LC_1ST"] = [ "alpha.alt", @@ -102,7 +101,6 @@ def test_default_groups_only2(ufo_module, data_dir, caplog): d.addSourceDescriptor(location={"Weight": 300}, font=ufo_module.Font()) d.addSourceDescriptor(location={"Weight": 900}, font=ufo_module.Font()) d.addInstanceDescriptor(styleName="2", location={"Weight": 400}) - d.findDefault() d.sources[0].font.groups["public.kern1.GRK_alpha_alt_LC_1ST"] = [ "alpha.alt",