Python API for "Expand Outline"

Is there a way to access this in Python? Can’t find it on GSPath.

ah, found it: .flattenOutlinesRemoveOverlap_origHints_secondaryPath_extraHandles_error_(False, None, None, None, None)

The function from the context menu calls this:

	NSArray *newPaths = [NSClassFromString(@"GlyphsFilterOffsetCurve") offsetPath:path offsetX:width / 2 offsetY:height / 2 makeStroke:!fill position:pos objects:returnObjects capStyleStart:capStart capStyleEnd:capEnd keepCompatibleOutlines:YES extraHandles:nil];

There is some more code before to get the settings from the path.

I refactored it that you can run (from version 3181)

NSArray *newPaths = [path expandedStroke];
1 Like

Thank you, Georg!