Corretto – Font Post-Processing for Glyphs

Interaction With Other Plugins

If you have multiple Glyphs plugins that run whenever a font is exported (in technical terms: using the DOCUMENTEXPORTED callback), and you notice strange effects, those are probably a result of the order in which the plugins are called.

For example, the Glyphs OpenType MATH Plug-in opens the exported font file and adds an OpenType MATH table to it.

Corretto also opens and modifies the exported font file.

The order in which those plugins are called is not deterministic. For example, if you use Corretto to save an xml dump of your font, and you look at the ttx file, you may find that the MATH table is missing from it even though it is present in the actual font.

The reason is that on export, Corretto was called before the OpenType MATH plugin, so the OpenType MATH plugin added its table later and Corretto didn’t see it.

Also, the execution of the plugins is not coordinated, so one plugin can not be guaranteed to wait until the other has finished its work.

Case-by-Case Solutions

There is, alas, no easy solution for this.

In case of the Glyphs OpenType MATH Plug-in, we have worked with the developer to implement a solution. This would have to be done for each plugin that interferes with Corretto’s operation, though.

Glyphs OpenType MATH Plug-in

Set a Glyphs default key to prevent the MATH plugin from running on export. Corretto will then call the required functions from the MATH plugin itself at the appropriate time.

Glyphs.defaults["com.nagwa.MATHPlugin.skipExport"] = True

(Paste the line into the Macro Panel and Run it.)