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

Add support for UFOZ as input format when no -u flag is used #900

Merged
merged 4 commits into from
Jun 24, 2022

Conversation

NightFurySL2001
Copy link
Contributor

Resolves #887 .

`ufoLib2` will save with the same structure as it is opened. Since past UFOs are generated as `.ufo` folders, temporarily add parameter `structure="package"` to guarantee backwards compatibility. Might need to provide option to save as `.ufoz` in future updates.
@anthrotype
Copy link
Member

thank you! I thought it was already supported, but it seems like it wasn't :)
could you also add a little test please?

@NightFurySL2001
Copy link
Contributor Author

Sorry, I am quite new to contributing and am not sure on how to add tests 😅

@anthrotype
Copy link
Member

anthrotype commented Jun 24, 2022

no worries.

can you please fix the linter errors here:
https://github.com/googlefonts/fontmake/runs/7042616527?check_suite_focus=true

the autoformatter (black) is complaining about line length or something.
You can install black and run on the modified files and the linter error should go away

@anthrotype
Copy link
Member

out of curiosity, does it work if you run fontmake -u MyFont.ufoz (with the -u flag) instead of without -u (implicit format guessed from positional arguments' file extension)? I thought that would already work.

I'm still ok to accept a patch like yours, just wanted to confirm that.

@anthrotype
Copy link
Member

isort is now complaining about the order of imports, sorry.

+import os
 import sys
-import os

@NightFurySL2001
Copy link
Contributor Author

Yeah, using -u did work. It's just that it's not that easy to use lol
I'll fix the import too.

@NightFurySL2001
Copy link
Contributor Author

Also just a suggestion, might be better to provide the option to export .ufoz in future too. It's quite a pain in butt to export individual UFO folders for CJK fonts when one of them can easily surpass 10k+ glyphs. (and interpolating variable fonts... urgh)

@anthrotype
Copy link
Member

might be better to provide the option to export .ufoz

yeah, sounds good. Would you like to work on that in this same PR?

@NightFurySL2001
Copy link
Contributor Author

Not really, I have no idea on how to do this...

@anthrotype
Copy link
Member

ok that's fine. We can keep #887 open until that's done. So this PR here only adds support for reading .ufoz when passed in to the fontmake CLI without the explicit -u flag.
What's left to do for #887 is also allow ufoz as an additional output format for -o option. That would only be relevant for .glyphs inputs, of course (i.e. if one wants to convert a .glyphs file to a Designspace file + a set of .ufoz masters).

@anthrotype anthrotype changed the title "Add" support for UFOZ file format Add support for UFOZ as input format when no -u flag is used Jun 24, 2022
@anthrotype anthrotype merged commit c6e41de into googlefonts:main Jun 24, 2022
@NightFurySL2001
Copy link
Contributor Author

Ok thank you.

@NightFurySL2001 NightFurySL2001 deleted the patch-1 branch June 24, 2022 14:17
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 this pull request may close these issues.

Add support for .ufoz (UFO compressed ZIP format)
2 participants