In Case 1, I am generating fonts using the instance.generate() method. In this case, I can generate all fonts that I requested but they don’t get recognized in Adobe products (no option to adjust variable axes).
In Case 2, I am generating fonts using the undocumented font.export() method. In this case, I can only generate ttf variable font which works beautifully. Even though I specified WOFF and WOFF2 containers, I only get ttf format. These work fine through the export dialog box, but not programmatically through Python API.
I found a way. The bug seems to ignore Containers=[] argument. I went back to the export dialog box in the GUI and noticed that only ttf was checked. I checked all of them:
And now it exports all 3 containers through the Python API. I presume, the GUI dialog box is changing some internal state and that’s what’s being used to export.
Not super important but would love to see support for:
Use container=[] argument in the python f.export() function.
OTF container for variable fonts would be awesome as well.