Hello, I am finding that using GSPath.insertNode_atIndex_() inserts an offcurve node, despite me specifying that the inserted node is of type CURVE or LINE.
Is this intentional? Do I have to use GSPath.nodes.insert(index + 1, node)?
Hello, I am finding that using GSPath.insertNode_atIndex_() inserts an offcurve node, despite me specifying that the inserted node is of type CURVE or LINE.
Is this intentional? Do I have to use GSPath.nodes.insert(index + 1, node)?
building up a path is tricky. It needs a certain structure. So if you add a offcurve without another and a curve following, then Glyphs will try to recover and one option is to change them to line nodes. You might need to wrap the change operation in layer.stop/startUpdates.
I see, thanks for the explanation. I’ve gone with the path.nodes.insert() option, that works best in my current case.
Check the python wrapper. It uses the same API.