got a formerly working script, which is not working anymore. basically it uses the RoboFab getPen() like so:
from robofab.world import CurrentFont
f = CurrentFont()
newGlyph = f.newGlyph('demoDrawGlyph', clear=True)
newGlyph.width = 1000
## here is an issue ##
pen = newGlyph.getPen()
pen.moveTo((100, 100))
pen.lineTo((800, 100))
pen.lineTo((100, 100))
pen.closePath()
newGlyph.update()
f.update()
It gets me:
ImportError: No module named GSPen
When I remove the parenthesis behind pen = newGlyph.getPen(), it runs further, but then I get: AttributeError: 'function' object has no attribute 'moveTo'
RoboFab itself seems to be working. It nicely creates a new Glyph with the proper name and width, it is empty though and got trouble with the moveTo guys. Also i just updated the objectsGS.py from schriftgestalt.
The version is good. There is something else going on. Iâm on a pretty new system and your initial script works fine so there is something else going on. Can you rename your plugin folder and restart Glyphs and see if the script works?
it makes the new Glyphs, but still gets me the error:
Traceback (most recent call last): File "<string>", line 7, in <module> File "/Library/Python/2.7/site-packages/robofab/objects/objectsBase.py", line 1442, in getPen ....return SegmentToPointPen(self.getPointPen()) File "/Users/Mark/Library/Application Support/Glyphs/Scripts/objectsGS.py", line 606, in getPointPen ....from GSPen import GSPointPen ImportError: No module named GSPen
I renamed the Plugins folder back
thus, got my Plugins back
running the script from the macro window causes the same as with renamed Plugin folder