schriftgestalt / Glyphs-Scripts

Some useful scripts to work with Glyphs
glyphsapp.com
114 stars 103 forks source link

[Glyphs Import] if Glyphs.app not installed, search for GlyphData.xml in FontLab/Studio 5/Data #28

Closed anthrotype closed 8 years ago

anthrotype commented 8 years ago

If Glyphs.app is not installed (e.g on Windows), the script can search for the "GlyphData.xml" file inside FontLab's "Data" directory -- which is where FontLab would store this kind of files.

On OSX:

>>> os.path.join(fl.path, "Data")
"/Library/Application Support/FontLab/Studio 5/Data"

On Windows:

>>> os.path.join(fl.path, "Data")
"C:\Program Files (x86)\FontLab\Studio 5\Data"

The user can download "GlyphData.xml" from https://github.com/schriftgestalt/GlyphsInfo and place it in there, so the script can find it.

anthrotype commented 8 years ago

@schriftgestalt could this be merged as well? I think it's better to search for GlyphData.xml in a default location (e.g. Fontlab's "Data" folder), instead of having the user modify the script to insert a custom path. Of course, the preference is still given to the file bundled in /Applications/Glyphs.app, if that is available.