Hey there.
I have trouble to access and modify the handles of a node.
How can i modify the handles of a node?
Regards
Hey there.
I have trouble to access and modify the handles of a node.
How can i modify the handles of a node?
Regards
What do you mean. Can you explain what you are trying to do?
Oh, sorry for my bad explaination.
I want to randomize the handles of a node with a script. I couldnt find any method or object in the Glyphs Documentation.
Is there a way to access and modify the coordinates of a handle?
No such thing. Handles do not belong to a node. Semantically, they rather belong to the curve segment. Glyphs treats them as nodes like all the other nodes, except that they are offcurve, not oncurve. This code sample should give you all the clues:
for thisPath in Layer.paths:
for thisNode in thisPath.nodes:
if thisNode.type == GSOFFCURVE:
print "Handle:", thisNode.x, thisNode.y
Layer
is a predefined object in the Macro window, pointing at the current selected layer. To make it work outside the macro window, add this line before the code:
Layer = Glyphs.font.selectedLayers[0]
Yes, but i didnt found any idea how to do this — i didnt read it completely. I didnt found any explaination about this – like @mekkablue did.
Thank you @mekkablue, i think that will do the trick.