Macro Panel / G2 Documentation

Hi all,

I m on my way to learn some python for Glyphs.
I often use some editors for write the code (sublime2, textmate etc).
But for now in Glyphs, it is more comfortable to write the direct way in the Macro Panel.

my qu: Is there a Snippet/Way/Workaround to
get to Glyphs (and the actual Font) out of Texmate, Sublime etc?
(I only know some uncomfortable: via script-folder or copy & paste :))

another small qu:
How can I return the export-path of webfont (I have set up in info) via python?
I was looking for reference in the documentation, but there wasn’t this property … is there a beta-doc for g2?

The macro panel is only for quick&dirty temporary scripting. For writing scripts, I recommend to stick to your editors.

There is some Python doc on, and you can try digging through the stuff with help(class), e.g., help(Glyphs) in the macro window.

ok thank you i will try

I had a look to the docu, but nothing tells me more about the “menu” with save, export etc.

I also tried using help(Glyphs) but … I dont really understand the code: what is a property of what, what ist the funktion etc …

I just need the object (str) for the export paths of the webfont and font.

The paths are written into the defaults (preferences). You can take a look inside ~/Library/Preferences/com.GeorgSeifert.Glyphs.plist to see what is saved there. You will, e.g., find the currently set export path for OTFs as “OTFExportPath”. Use this key with Glyphs.defaults, e.g.:

print Glyphs.defaults[“OTFExportPath”]

I had a look, very helpful. thank you

for web export:
print Glyphs.defaults[“WebfontPluginExportPath”]