Prevent round corners to remove nodes

Is there a way to prevent the round corners filter to remove nodes when they are colinear?
For instance on a path like this one it will remove the nodes in the middle which at first glance seems useless but I need to keep the for compatibilty.

Any ideas?

What version of Glyphs do you have? I just tried in the latest cutting edge version and those nodes were not removed.

Same version, just checked when running from Filters > Round Corner its ok. But I’m running it from a script. here a test script:

font = Glyphs.font
print (font)
selectedLayers = font.selectedLayers

roundCornerFilter = NSClassFromString("GlyphsFilterRoundCorner")

checkSelection = False
visualCorrections = True
roundCoordinate = True

for glyph in font.glyphs:
	for layer in glyph.layers:
		roundCornerFilter.roundLayer_radius_checkSelection_visualCorrect_grid_(layer, radius, checkSelection, visualCorrections, roundCoordinate)

please use:

roundCornerFilter.roundLayer_radius_checkSelection_visualCorrect_forceCompatibilty_grid_(layer, radius, checkSelection, visualCorrections, True, roundCoordinate)
1 Like

Many many thanks!!

kind of related…
for compatibiliy it will be better that open corners would not be rounded.
For instance, the open corner on the first image is to make it compatbile with the second screenshot, when rounding the corners the paths on the first image gets rounded breaking compatibilty.

I need to think about this.


Hi @GeorgSeifert “Force compatibilty” is not working in the latest version. I guess it stopped working after 3.2 (3219).

Hi @GeorgSeifert can you take a look to this when you have some time?