I’m extending the MATH Plugin to read MATH table and import it into the data the plugin uses (some stored in master and glyph userData, others as anchors).
I already have a callback for
DOCUMENTOPENED, so I open the font there using
GSDocument.filePath and import the data into the
All is good but I have some questions/issues:
- Is this the right approach or there is a better way?
- The causes the font and the affected glyphs to be Edited, but since everything is imported and the user didn’t manually change anything, I want to avoid this. Is there is away to revert the edited status of the font and the glyphs?
- You can clean up after yourself:
from AppKit import NSChangeCleared
for g in font.glyphs:
This works, thanks.
Another question. If I’m opening a font collection file, Glyphs will ask the user to select a font from the collection. How do I know which font was selected to open it as well?
There is currently no way to do that directly. Maybe you can recognise it from the fontName?
I added the fontIndex to the
I guess, but I wanted to check for a simpler solution first.
Thanks. That is enough for me, I don’t mind it working only in cutting edge for now.
Did this make it into release?
I only had it in the future branch. I just moved it into he 3 branch.
Got it working now, thanks!