<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[hasOverlap() does not detect all overlaps?]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm currently working on a little tool and one of its functions is to detect and beyond that eventually remove overlaps.</p>
<p dir="auto">I am there fore using the <code>hasOverlap()</code> method like this:</p>
<pre><code class="language-python">if glyph.hasOverlap():
    print(glyph.name)
    glyph.markColor = 0.5, 0, 0.2, 0.75
    # and so on
</code></pre>
<p dir="auto">This works quite reliable, with the exception, that it does not find the overlap in my /Y (my function to remove overlaps does not work either here since its depending on the outcome of the <code>hasOverlap()</code> function).</p>
<p dir="auto">The built-in right-click context function to remove overlaps works however.</p>
<p dir="auto">After some testing I found out, that it might be connected to the positioning of my outlines and points. As you can see the stem goes directly through the two points here.</p>
<p dir="auto"><img src="/assets/uploads/files/1556537695782-bildschirmfoto-2019-04-29-um-13.21.03.png" alt="Bildschirmfoto 2019-04-29 um 13.21.03.png" class="img-responsive img-markdown" /></p>
<p dir="auto">If the outline is just moved by one unit and the outline does not go directly through both points the overlap is detected.<br />
Am I missing something here, or is there another (or better) way to detect overlaps and to make my tool work?</p>
<p dir="auto">TIA<br />
daniel</p>
]]></description><link>https://forum.robofont.com/topic/631/hasoverlap-does-not-detect-all-overlaps</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 17:42:57 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/631.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Apr 2019 11:39:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 12:30:30 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm currently working on a little tool and one of its functions is to detect and beyond that eventually remove overlaps.</p>
<p dir="auto">I am there fore using the <code>hasOverlap()</code> method like this:</p>
<pre><code class="language-python">if glyph.hasOverlap():
    print(glyph.name)
    glyph.markColor = 0.5, 0, 0.2, 0.75
    # and so on
</code></pre>
<p dir="auto">This works quite reliable, with the exception, that it does not find the overlap in my /Y (my function to remove overlaps does not work either here since its depending on the outcome of the <code>hasOverlap()</code> function).</p>
<p dir="auto">The built-in right-click context function to remove overlaps works however.</p>
<p dir="auto">After some testing I found out, that it might be connected to the positioning of my outlines and points. As you can see the stem goes directly through the two points here.</p>
<p dir="auto"><img src="/assets/uploads/files/1556537695782-bildschirmfoto-2019-04-29-um-13.21.03.png" alt="Bildschirmfoto 2019-04-29 um 13.21.03.png" class="img-responsive img-markdown" /></p>
<p dir="auto">If the outline is just moved by one unit and the outline does not go directly through both points the overlap is detected.<br />
Am I missing something here, or is there another (or better) way to detect overlaps and to make my tool work?</p>
<p dir="auto">TIA<br />
daniel</p>
]]></description><link>https://forum.robofont.com/post/2296</link><guid isPermaLink="true">https://forum.robofont.com/post/2296</guid><dc:creator><![CDATA[ddaanniiieeelll]]></dc:creator><pubDate>Mon, 29 Apr 2019 12:30:30 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 12:28:28 GMT]]></title><description><![CDATA[<p dir="auto">hi @daniel,</p>
<p dir="auto">I can confirm the false negative for this particular shape. it looks like you’ve found a bug in the overlap detection algorithm 🐞 thanks!</p>
<p dir="auto">I’ll make a few more tests and create an issue in <a href="https://github.com/typemytype/booleanOperations" rel="nofollow">booleanOperations</a>.</p>
]]></description><link>https://forum.robofont.com/post/2297</link><guid isPermaLink="true">https://forum.robofont.com/post/2297</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Mon, 29 Apr 2019 12:28:28 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 13:20:43 GMT]]></title><description><![CDATA[<p dir="auto">Ah, but since the built-in remove overlap in RF works in this case could you explain how this function detects the overlap and removes it?</p>
]]></description><link>https://forum.robofont.com/post/2298</link><guid isPermaLink="true">https://forum.robofont.com/post/2298</guid><dc:creator><![CDATA[ddaanniiieeelll]]></dc:creator><pubDate>Mon, 29 Apr 2019 13:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 13:39:24 GMT]]></title><description><![CDATA[<p dir="auto">can you share the glif xml of that Y? (copy paste the selection from RoboFont into the forum)</p>
]]></description><link>https://forum.robofont.com/post/2299</link><guid isPermaLink="true">https://forum.robofont.com/post/2299</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Mon, 29 Apr 2019 13:39:24 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 15:21:56 GMT]]></title><description><![CDATA[<pre><code class="language-xml">&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;glyph name="Y" format="2"&gt;
  &lt;advance width="600"/&gt;
  &lt;unicode hex="0059"/&gt;
  &lt;outline&gt;
    &lt;contour&gt;
      &lt;point x="35" y="700" type="line"/&gt;
      &lt;point x="254" y="286" type="line"/&gt;
      &lt;point x="346" y="286" type="line"/&gt;
      &lt;point x="565" y="700" type="line"/&gt;
      &lt;point x="471" y="700" type="line"/&gt;
      &lt;point x="300" y="374" type="line"/&gt;
      &lt;point x="129" y="700" type="line"/&gt;
    &lt;/contour&gt;
    &lt;contour&gt;
      &lt;point x="254" y="351" type="line"/&gt;
      &lt;point x="254" y="0" type="line"/&gt;
      &lt;point x="346" y="0" type="line"/&gt;
      &lt;point x="346" y="351" type="line"/&gt;
    &lt;/contour&gt;
  &lt;/outline&gt;
&lt;/glyph&gt;
</code></pre>
]]></description><link>https://forum.robofont.com/post/2301</link><guid isPermaLink="true">https://forum.robofont.com/post/2301</guid><dc:creator><![CDATA[ddaanniiieeelll]]></dc:creator><pubDate>Mon, 29 Apr 2019 15:21:56 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 17:17:01 GMT]]></title><description><![CDATA[<p dir="auto">I think the problem can be generalized to colinear straight segments in different contours. here’s the <a href="https://github.com/typemytype/booleanOperations/issues/54" rel="nofollow">bug report</a> with a few more examples.</p>
<p dir="auto">you can ‘cheat’ the bug by moving the angled segments a few units down and inward:</p>
<p dir="auto"><img src="/assets/uploads/files/1556558005220-screen-shot-2019-04-29-at-14.13.11.png" alt="Screen Shot 2019-04-29 at 14.13.11.png" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.robofont.com/post/2305</link><guid isPermaLink="true">https://forum.robofont.com/post/2305</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Mon, 29 Apr 2019 17:17:01 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 29 Apr 2019 18:13:54 GMT]]></title><description><![CDATA[<p dir="auto">Exactly, moving the outline was my workaround as well.</p>
<p dir="auto">I'll keep an eye on the bug report too. Thanks for finding the additional cases where overlaps are not detected, this is quite helpful during the mastering process :)</p>
]]></description><link>https://forum.robofont.com/post/2307</link><guid isPermaLink="true">https://forum.robofont.com/post/2307</guid><dc:creator><![CDATA[ddaanniiieeelll]]></dc:creator><pubDate>Mon, 29 Apr 2019 18:13:54 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 20 May 2019 16:10:31 GMT]]></title><description><![CDATA[<p dir="auto">Another reliable way to find overlaps could be this</p>
<pre><code class="language-python">f = CurrentFont()

for g in f:
    testglyph = g.copy()
    testglyph.removeOverlap()
    
    if len(g) != len(testglyph):
        g.mark = (0.5, 0, 0, 0.9)
</code></pre>
<p dir="auto">(idea of <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/245">@benedikt</a>)</p>
<p dir="auto">So far I had no complications with that method</p>
]]></description><link>https://forum.robofont.com/post/2382</link><guid isPermaLink="true">https://forum.robofont.com/post/2382</guid><dc:creator><![CDATA[ddaanniiieeelll]]></dc:creator><pubDate>Mon, 20 May 2019 16:10:31 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 20 May 2019 14:05:26 GMT]]></title><description><![CDATA[<p dir="auto">in future version of RoboFont <code>glyph.hasOverlaps()</code> does not return a list of intersection anymore.</p>
<p dir="auto">It will return a boolean indicating if the glyph has overlaps. The check happens in similar way as your proposal. Only a bit faster :), as a <code>booleanOperations.union</code> takes a pointPen as argument, so you dont need to copy the whole glyph...</p>
]]></description><link>https://forum.robofont.com/post/2383</link><guid isPermaLink="true">https://forum.robofont.com/post/2383</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Mon, 20 May 2019 14:05:26 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 20 May 2019 14:34:06 GMT]]></title><description><![CDATA[<p dir="auto">Cool :)</p>
<p dir="auto">It's already kind of not too slowly but you have to combine the above + hasOverlap() method to find everything.</p>
<p dir="auto">But less code and faster is always better :)</p>
]]></description><link>https://forum.robofont.com/post/2384</link><guid isPermaLink="true">https://forum.robofont.com/post/2384</guid><dc:creator><![CDATA[ddaanniiieeelll]]></dc:creator><pubDate>Mon, 20 May 2019 14:34:06 GMT</pubDate></item><item><title><![CDATA[Reply to hasOverlap() does not detect all overlaps? on Mon, 10 Jun 2019 11:36:58 GMT]]></title><description><![CDATA[<p dir="auto">hello @daniel,</p>
<p dir="auto">the <a href="http://forum.robofont.com/topic/651/robofont-3-3b" rel="nofollow">latest beta release</a> includes an improved <code>hasOverlap()</code> function which returns a <code>bool</code> instead of a list of overlap positions. please give a try… thanks!</p>
]]></description><link>https://forum.robofont.com/post/2418</link><guid isPermaLink="true">https://forum.robofont.com/post/2418</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Mon, 10 Jun 2019 11:36:58 GMT</pubDate></item></channel></rss>