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

[checkoutlinesufo] consider incoming UFO formatVersion #477

Closed
frankrolf opened this issue Jul 12, 2018 · 0 comments
Closed

[checkoutlinesufo] consider incoming UFO formatVersion #477

frankrolf opened this issue Jul 12, 2018 · 0 comments
Assignees

Comments

@frankrolf
Copy link
Member

frankrolf commented Jul 12, 2018

As indicated in my UFO3 issue here, checkoutlinesufo follows somewhat of a hybrid approach:
It writes UFO3-style layers into UFO2 files.
If I remember correctly, the UFO version number is manually changed back to 2 after writing the UFO3 layer with defcon (see here: https://github.com/adobe-type-tools/afdko/blob/develop/afdko/Tools/SharedData/FDKScripts/CheckOutlinesUFO.py#L143-L153)

checkoutlinesufo fails when run on a real UFO3 file:

Saving font...
Traceback (most recent call last):
  File "/usr/local/bin/checkoutlinesufo", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/afdko/Tools/SharedData/FDKScripts/CheckOutlinesUFO.py", line 1146, in main
    run(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/afdko/Tools/SharedData/FDKScripts/CheckOutlinesUFO.py", line 1135, in run
    font_file.save()
  File "/usr/local/lib/python2.7/site-packages/afdko/Tools/SharedData/FDKScripts/CheckOutlinesUFO.py", line 139, in save
    writer = UFOWriter(self.defcon_font.path, formatVersion=2)
  File "/usr/local/lib/python2.7/site-packages/ufoLib/__init__.py", line 581, in __init__
    raise UFOLibError("The UFO located at this path is a higher version (%d) than the version (%d) that is trying to be written. This is not supported." % (previousFormatVersion, formatVersion))
ufoLib.UFOLibError: The UFO located at this path is a higher version (3) than the version (2) that is trying to be written. This is not supported.

It would be great if checkoutlinesufo could recognize the incoming file format, and adjust its behavior accordingly.

@miguelsousa miguelsousa changed the title [checkoutlinesufo] consider incoming UFO type [checkoutlinesufo] consider incoming UFO formatVersion Jul 13, 2018
@miguelsousa miguelsousa self-assigned this Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants