Skip to content

Extraneous points after remove overlap#72

Description

@ryanbugden

When I hit Remove Overlap in RoboFont, I get unexpected extraneous on-curve points.

Image Image

I tested on multiple RF builds.
馃煝 Last confirmed good build: 2601141441 (1/14/2026)
馃敶 First confirmed bad build: 2602041514 (2/4/2026)

I think the bug is in flatten.py:

@typemytype @skef I am experiencing unexpected extraneous points after remove overlap. If I comment out these two lines, it fixes it. Bug report on RoboFont Discord.

It seems like this is a fix to avoid desync of logic of some sort, but it's causing another bug. Is there a better way we can do this?

cc @typesupply

_Originally posted by @ryanbugden in c83d3bc

Test glif

This is an example shape that results in two points on the inside corner.

<?xml version='1.0' encoding='UTF-8'?>
<glyph name="n" format="2">
  <advance width="1090"/>
  <outline>
    <contour>
      <point x="550" y="380" type="line"/>
      <point x="738" y="540"/>
      <point x="833" y="738"/>
      <point x="833" y="973" type="curve" smooth="yes"/>
      <point x="833" y="1148"/>
      <point x="781" y="1274"/>
      <point x="707" y="1274" type="curve" smooth="yes"/>
      <point x="676" y="1274"/>
      <point x="653" y="1251"/>
      <point x="643" y="1210" type="curve" smooth="yes"/>
      <point x="584" y="973"/>
      <point x="437" y="826"/>
      <point x="215" y="782" type="curve"/>
      <point x="253" y="629" type="line"/>
      <point x="484" y="688"/>
      <point x="656" y="850"/>
      <point x="731" y="1099" type="curve"/>
      <point x="689" y="1087" type="line"/>
      <point x="703" y="830"/>
      <point x="629" y="635"/>
      <point x="441" y="480" type="curve"/>
    </contour>
  </outline>
</glyph>

Here is another, to prove it's not related to extreme points.

<?xml version='1.0' encoding='UTF-8'?>
<glyph name="n" format="2">
  <advance width="1090"/>
  <outline>
    <contour>
      <point x="289" y="923" type="line"/>
      <point x="324" y="936"/>
      <point x="360" y="943"/>
      <point x="396" y="943" type="curve" smooth="yes"/>
      <point x="521" y="943"/>
      <point x="609" y="858"/>
      <point x="609" y="737" type="curve" smooth="yes"/>
      <point x="609" y="686"/>
      <point x="594" y="636"/>
      <point x="561" y="577" type="curve"/>
      <point x="632" y="547" type="line"/>
      <point x="695" y="664"/>
      <point x="725" y="768"/>
      <point x="725" y="868" type="curve" smooth="yes"/>
      <point x="725" y="1047"/>
      <point x="630" y="1159"/>
      <point x="478" y="1159" type="curve" smooth="yes"/>
      <point x="398" y="1159"/>
      <point x="317" y="1129"/>
      <point x="237" y="1070" type="curve"/>
      <point x="261" y="1003" type="line"/>
      <point x="332" y="1059"/>
      <point x="399" y="1086"/>
      <point x="468" y="1086" type="curve" smooth="yes"/>
      <point x="590" y="1086"/>
      <point x="659" y="1002"/>
      <point x="659" y="870" type="curve" smooth="yes"/>
      <point x="659" y="829"/>
      <point x="651" y="781"/>
      <point x="643" y="740" type="curve"/>
      <point x="653" y="712" type="line"/>
      <point x="683" y="884"/>
      <point x="568" y="1012"/>
      <point x="418" y="1012" type="curve" smooth="yes"/>
      <point x="368" y="1012"/>
      <point x="318" y="1001"/>
      <point x="269" y="978" type="curve"/>
    </contour>
  </outline>
</glyph>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions