Exporting variable fonts from project file

How can I export variable fonts from a project file? The “Export” button only exports static fonts.

And another issue: I have a plugin that gets a DOCUMENTEXPORTED callback. When exporting from a project file, notification.object()["instance"].font does not contain the font, but the GSProjectDocument, which e.g. doesn’t have tempData or customParameters attributes of GSFont, so the plugin throws a traceback. How to access the font object in this case?