Hello, I’m hoping to make a master from an extrapolated instance, via script.
Question 1:
So, I’d hope to replicate the functionality discussed and revealed in Instance as master!, but purely from a script. Is there an existing method, or might I have to do something like generating the instance, then importing this as a master? I’m not finding it in the API doc.
Question 2:
Does the generate()
method not work with extrapolated instances, or have I made a dumb mistake here? I’m following the example in the docs, but when I use…
exportFolder = '/Users/stephennixon/Desktop'
for instance in Glyphs.font.instances:
# my extrapolated instance is at 1350.0
if instance.weightValue == 1350.0:
# this works fine
print instance.name
# this line fails (see below)
instance.generate(FontPath = exportFolder)
Glyphs.showNotification('Export fonts', 'The export of %s was successful.' % (Glyphs.font.familyName))
…I get the following error:
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "GlyphsApp/GlyphsApp/__init__.py", line 3728, in __Instance_Export__
TypeError: 'NSKVONotifying_GSFont' object is not callable
Just in case it’s useful
I’m in Glyphs Version 2.5.1 (1141), on macOS 10.14.
Thanks for any insight on either or both questions!