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

Exporting font does not work for sources not yet saved at least once #2

Closed
florianpircher opened this issue May 16, 2024 · 4 comments
Closed

Comments

@florianpircher
Copy link

florianpircher commented May 16, 2024

Continuing from schriftgestalt/glyphs-packages#146

I am not sure what the root cause is, but when I create a new empty document, export fails. Once once I save the document to a file does the export works:

Demo.mp4
@anthrotype
Copy link
Member

thanks, I was able to reproduce now. I looks like when the GSFont is saved from python code (with .save() method like the plugin is doing), it does not set the .appVersion string for some reason; only when doing "Save" from the File menu (or CMD-S), it gets set:

$ diff -u /Users/clupo/Downloads/New\ Font\ 2.glyphs /Users/clupo/Downloads/New\ Font\ 2\ \(unsaved\).glyphs
--- /Users/clupo/Downloads/New Font 2.glyphs	2024-05-16 13:55:54
+++ /Users/clupo/Downloads/New Font 2 (unsaved).glyphs	2024-05-16 13:55:13
@@ -1,5 +1,5 @@
 {
-.appVersion = "3306";
+.appVersion = "";
 .formatVersion = 3;
 date = "2024-05-16 12:55:06 +0000";
 familyName = "New Font";

We should probably relax the strictness of fontc parser for the ".appVersion" field and allow empty string.
I wonder why there's such a difference though between saving from code or from UI.

@anthrotype anthrotype changed the title Exporting font does not work in some cases Exporting font does not work for sources not yet saved at least once May 16, 2024
@schriftgestalt
Copy link

An empty appVersion string is invalid.
I fixed it in Glyphs.

@anthrotype
Copy link
Member

thank you!

@florianpircher
Copy link
Author

Thanks for looking into this and thanks for pointing out the relocatable Python installation!

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

No branches or pull requests

3 participants