Text preview of complex scripts

So the problem here looks to be “Error exporting instance”. Can you export the font normally? (Has it been saved first?)

Yep Glyphs can export it fine. As it’s a font in progress, there are incompatible masters in quite a lot of glyphs, but Glyphs just skips those when exporting.

OK, that’s weird. Can you try this in the macro window?

import os
p = os.path.expanduser("~/Library/Application Support/Glyphs/Temp/")
for i in Glyphs.font.instances:
  exp = NSClassFromString("GSExportInstanceOperation").alloc().initWithFont_instance_format_(Glyphs.font, i,0)
  exp.setInstallFontURL_(NSURL.fileURLWithPath_(p))
  exp.setAutohint_(False)
  exp.setRemoveOverlap_(False)
  exp.setUseSubroutines_(False)
  exp.setUseProductionNames_(False)
  exp.setTempPath_(os.path.expanduser("~/Library/Application Support/Glyphs/Temp/"))
  exp.main()
  print(exp.finalFontFile())

If that works and GlyphSILE doesn’t, I’m not sure what’s going on. @GeorgSeifert? The ObjC code here is https://github.com/simoncozens/GlyphSILE/blob/89b538599cebaa4a7f474796165be645f8c84908/GlyphSILE/GlyphSILEWindow.m#L94-L112 (which I think you contributed.) I can’t work out why that might fail, unless there are strange things going on with the temp directories.

2 Likes

Ah my mistake, sorry. Since the last export, I’d set one glyph to non-exporting but it was still named in an OT feature. Updating the feature fixed it. Glad to see the plugin is working now :slight_smile:

Maybe the SILE window could remember which instance and size was last used? It’s currently reverting to no selection.

1 Like