How to remove corner components

A simple script can do that. For instance, something like this:

for l in Glyphs.font.selectedLayers:
	delCount = 0
	for i in range(len(l.hints))[::-1]:
		if l.hints[i].type == CORNER:
			del l.hints[i]
			delCount += 1
	if delCount:
		print "Deleted %i corner component%s in '%s', layer '%s'." % (delCount, "s" if delCount>1 else "", l.parent.name, l.name)
4 Likes

Works like a charm!
Thank you, Rainer

Hi!
I place this script in the macro but is not working for me.
I’ve started working on the italics and I would like to remove all the _corners in the 2 masters I am working on in selected glyphs.

Thank you for helping!

What did happen? Any error message?

My Glyphs crashed today, I updated it, cleaned from some script. And now the little macro is working also. Pew, thank you.