On Fri, Aug 7, 2020 at 12:54 AM Anuj Verma <[email protected]> wrote: > > Hello Alexei, > > > Can you describe discontinuities with the same sign if I overlook them? > > So, I found there are two types of discontinuities due to overlapping > contours: > > A) Discontinuity in sign. (i.e. there is a sudden jump from negative to > positive) > B) Discontinuity in distances. (i.e. the points that should be at > infinity/spread have smaller distances)
Yeah. We should basically think of overlaying or combining two distance fields, generated independently one for each contour. Has this been discussed in the literature? > Also, I looked at a library (msdfgen) which handles overlapping contours > without > removing the overlaps. It works well, but it doesn't work for > self-intersecting contours, > that is why I'm not sure whether it's worth implementing. Self intersecting contours should never and hopefully will never be allowed in fonts. > Finally, I can find and fix signs such that all points inside a shape are > positive and > all points outside are negative. But I don't know how I can fix the incorrect > distances > caused by the overlaps. Here is one final example: > https://i.imgur.com/jiaqiBS.png > In this the point `P' has a positive sign and it points to a line inside the > shape, which > is not correct, instead it should point to the corner. Moreover there is no > corner in the > shape because they are two separate contours, so I think removing the > overlaps is > the best way to handle this. Here I concede we will never find proper distance unless we define the intersection point. Alexei
