Correct for (rare) bad tracking of previousIntersectionPoint#65
Correct for (rare) bad tracking of previousIntersectionPoint#65typemytype merged 2 commits intotypemytype:masterfrom
Conversation
|
I talked about this with @typemytype, and he was concerned that this commit might create unexpected scenarios for other high-profile users of this repository. He suggested checking back with @anthrotype – do you think you’d have some bandwidth for checking this update in your tools? Thank you :-) |
|
Hey Frank, thanks for checking with me. To be honest, it's too hard for me to track all the potential unexpected changes that this patch may produce for fonts built with fontmake (where booleanOperations is still the default remove-overlap backend). |
The single E glyph in prevint.zip exhibits a problem with
previousIntersectionPointtracking inflatten.py:reCurveSubSegments(). This is a real example from a production font but unfortunately I haven't been able to generate other similar cases synthetically. (I tried less hard with this one because the fix seemed straightforward.)Anyway, it appears that very rarely the
previousIntersectionPointis not on the segment handled next. This is a particular problem for theelif flatSegment[-1] == inputSegment.flat[-1] and flatSegment[0] != inputSegment.flat[0]:code, which will use that point as the start of the spline if it isn'tNone.My added code just checks to see if the
previousIntersectionPointis actually on the currentinputSegmentand if not sets it back toNoneso that it won't cause problems.