Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[checkoutlinesufo] improve overlap removal #1146

Merged
merged 3 commits into from
May 29, 2020
Merged

Conversation

josh-hadley
Copy link
Collaborator

  • added a step to remove coincident points after overlap removal which can – when located at/near contour start coordinate – cause a crash when setting start point on the new contour
  • added supporting code in ufotools
  • updated checkoutlinesufo test with case that hits this issue
  • added assertion in code before setting start point in case there is some other condition that causes this that was not fixed by these changes
  • added FutureWarning to checkoutlinesufo regarding deprecation of UFO2-as-UFO3 hybrid (see [checkoutlinesufo] Remove UFO2/UFO3 hack #1135 )

closes #790

- removing overlap can leave coincident (or very near coincident) points. When those points are at the contour start point (as determined by `restore_contour_order`), this can cause a crash when `contour.setStartPoint` is called more than once.
- updated test data that was affected (in a very minor way) by the above change
- added warning for dropping support of "hybrid" UFO2-as-UFO3
- update `ufotools.thresholdAttrGlyph` method to preserve 'smooth' attribute in points after ThresholdPen which can revert some cases. Preservation is done by contour index + coordinate rather than point index, since ThresholdPen can remove points (invalidating index-based tracking)
- revert test data to original form
Copy link
Contributor

@punchcutter punchcutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josh-hadley josh-hadley merged commit ef37342 into develop May 29, 2020
@josh-hadley josh-hadley deleted the jh-checkoutlines-fix branch May 29, 2020 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[checkoutlinesufo] Fails if component position coincides with base glyph start point
2 participants