Hey Guys —
I started noodling around with drawing points and paths with scripts. I got quite far with GSNodes but suddenly hit a wall when it was time to build curves. It seems like the Robofab Pens are recommended for general drawing? However curveTo isn’t working. I’m ending up with straight lines only. Faulty curveTo code below. Any help always wildly appreciated!
from robofab.world import CurrentFont
from objectsGS import CurrentFont, RGlyph, GSLINE, GSCURVE, GSOFFCURVE, GSSHARP, GSSMOOTH
import random
random.seed()
f = CurrentFont()
thisLayers = Glyphs.font.selectedLayers[0]
newGlyph = f.newGlyph('demoDrawGlyph', clear=True)
newGlyph.width = 1000
pen = newGlyph.getPen()
pen.moveTo((100, 100))
pen.lineTo((800, 100))
pen.curveTo((1000, 300), (1000, 600), (800, 800))
pen.lineTo((100, 800))
pen.lineTo((100, 100))
pen.closePath()
newGlyph.update()
f.update()