schriftgestalt / GlyphsSDK

Scripting SDK for Glyphs
Apache License 2.0
89 stars 37 forks source link

GSFont: `save()` issues #77

Open Mark2Mark opened 2 years ago

Mark2Mark commented 2 years ago

_While when executing font.save() on a font that is open in the UI, it works as expected._


The Documentation says:

If no path is given, it saves to the existing location.

Parameters: path (str) – Optional file path

formatVersion (int) – the format of the file

makeCopy (bool) – saves a new file without changeing the documents file paths

schriftgestalt commented 1 year ago

When a font is loaded directly (GSFont({PATH})) it doesn't have a document and thous can’t store a file path. So .save() always needs a path argument.

when makeCopy is set, it always requires a file paths as that is the purpose of that flag.