Has someone made a script already ?
What exactly do you mean? Overlaps of paths with each other?
Thereās a glyphs app version of Touche already actually! (I made a fork which outputs the results as tabs https://github.com/weiweihuanghuang/Touche )
@mekkablue I mean to check which glyphs have path overlaps in itself
You could make a copy of the paths, remove overlap and check if they changed (removing overlap mostly changes the start point so your comparison needs to take this into account).
Do you have any advice to rule out false positives where glyphs without overlaps but through the process of apply remove overlap their starting point changed?
I have tried running a ācorrect path directionsā on both the original gylph and the new āremove overlapā glyph, but thereās still situations where the new and old will have a different starting point even though nothing has changed ā i.e. it flip flops between 2 points.
You could just do a more thorough analysis, I guess? Something that is geared to what you need this for.
Here is some code that might help. There are overlaps if the len()
of the segments changes.
paths = list(Layer.paths)
GSPathOperator = NSClassFromString("GSPathOperator")
segments = GSPathOperator.segmentsFromPaths_(paths)
print len(segments)
PathOperator = GSPathOperator.new()
PathOperator.addIntersections_(segments)
print len(segments)
thanks georg thats really helpful!