2.5.1 generating fonts with script fails

Hi,

For a long time I have been using a script to generate fonts. Updating to 2.5.1 it fails. This is the part of the code in question:

if len(masterFont.instances) > 0 and len(folder) > 0:
	for instance in masterFont.instances:
		if instance.active == True:
			if exportFonts == True:
				result = instance.generate(FontPath = folder, AutoHint = False, Format = fontFormat, RemoveOverlap = True , UseProductionNames = False )
				print result

And this is the error:

Traceback (most recent call last):
  File "Make Kannada OTL fonts.py", line 1466, in <module>
    result = instance.generate(FontPath = folder, AutoHint = False, Format = fontFormat, RemoveOverlap = True , UseProductionNames = False )
  File "GlyphsApp/GlyphsApp/__init__.py", line 3728, in __Instance_Export__
TypeError: 'NSKVONotifying_GSFont' object is not callable

This does not look like something I can fix.

Jelle

I have the same problem. instance.generate() is not working.

I believe that’ll be fixed in the next beta release.

I hope that’s before my presentation at TYPO Berlin tomorrow!

The update is up.

I have the same issue here, on 2.5.1:

File "GlyphsApp/GlyphsApp/__init__.py", line 3728, in __Instance_Export__
TypeError: 'NSKVONotifying_GSFont' object is not callable

The exact same macro works on 2.5.0. Any idea of what goes wrong?

You need to update to the latest cutting edge version (activate it in Preferences > Updates).

Brilliant, thanks Georg!