I need to get some Information (basically the glyphs) from a certain .glyphs file into another script. Glyphs.open() actually opens the file in the App, which is not what i want. Instead i’d like to instantiate it and work with the instance as a virtual GSFont. Is that possible?
My goal is to draw glyphs from a font that cannot be installed at the users computer, so I want to supply the .glyphs file in the script’s resources folder.
Now I did. Doesn’t work. the font object is a new, empty font: <GSFont "new Font" v1.0 with 1 masters and 0 instances>
The to-import font has an instance and glyphs, though.
I tried to call the font itself, laying next to the script, as well as getting the direct dir via parentFolderDir = os.path.abspath(__file__)[:-3] font = GSFont("%s/myFont.glyphs" % parentFolderDir)
So I bet the dir pah to file has to be set differently?!