How might I remove overlap in contours without erasing points along path?



  • I have glyphs set up with their point structure compatible between multiple UFOs in a designspace.

    Some of the paths have points that are right along their paths, so that these contours can interpolate with paths that are move curvy. Unfortunately, when I trigger the "remove overlap" function on selected contours, these "extra" points are erased. This causes compatibility issues.

    While I understand that it's generally nice to erase extra points, I need those points to stay in place.

    If I were to script an alternative contour-merging script, where might I start? Or, is there just some preference in RoboFont that I might have missed?

    657b9737-d4d4-4c75-9ec8-499531827d24-image.png


  • admin

    mmm, this is indeed a difficult one: remove overlap and keeping shapes interpolatable is not good match.. especially in line segments.

    You could run a pre-overlap code getting points that are going to be removed... and add them back in a post-overlap script (just thinking out loud without testing something)



  • Thanks for weighing in!

    Just to be clear, I'm not necessarily expecting things to stay magically compatible – I only am looking for a way to remove overlaps, but leave any points intact that are on the exterior of that combined shape. I think you understood my meaning already, but my initial image was pretty ambiguous, so this shows my general hope better:

    08de86ca-a22f-45bc-abd6-b665ab1f82af-image.png

    So, it sounds like the way the Remove Overlap functionality works, it's not that these points are removed as an extra step, but rather that their removal is a core part of the function? And there's no way to "turn that off"?

    As a simple temporary solution, I have found that I can at least have a visual of missing points by duplicating the glyph to an "overlap" layer, then turning that layer's visibility on.

    5400d9c3-cd2b-4b8a-a224-ef3c2a5af45e-image.png

    You could run a pre-overlap code getting points that are going to be removed... and add them back in a post-overlap script

    Is there some kind of accessible list of points to be removed (that doesn't seem very likely), or would I have to find a way to loop through points, and mathematically determine if they're on a straight path?