Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ufo_structure is sometimes undefined and set to None #1024

Closed
moyogo opened this issue Aug 5, 2023 · 0 comments · Fixed by #1025
Closed

ufo_structure is sometimes undefined and set to None #1024

moyogo opened this issue Aug 5, 2023 · 0 comments · Fixed by #1025

Comments

@moyogo
Copy link
Collaborator

moyogo commented Aug 5, 2023

No ufo_structure argument is passed with run_from_glyphs() so _fix_ufo_path() fails.

designspace = self.build_master_ufos(
glyphs_path,
designspace_path=designspace_path,
master_dir=master_dir,
instance_dir=instance_dir,
family_name=family_name,
mti_source=mti_source,
write_skipexportglyphs=write_skipexportglyphs,
generate_GDEF=generate_GDEF,
ufo_structure=kwargs.get("ufo_structure"),
indent_json=kwargs.get("indent_json"),
glyph_data=glyph_data,
save_ufos=save_ufos,
)

def _fix_ufo_path(path, ufo_structure):
"""Normalizes UFO path and updates extension suffix to match its structure"""
return os.path.normpath(
Path(path).with_suffix(UFO_STRUCTURE_EXTENSIONS[ufo_structure])
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant