Overlap detection & removal primitives - #2070
Open
RickyDaMa wants to merge 6 commits into
Open
Conversation
Pull out overlapping squares into helper function
anthrotype
reviewed
Jul 28, 2026
| let has_overlaps = non_zero_beziers | ||
| .contours() | ||
| .zip(even_odd_beziers.contours()) | ||
| .all(|(non_zero_contour, even_odd_contour)| non_zero_contour.path == even_odd_contour.path); |
Member
There was a problem hiding this comment.
Wait, shouldn't the logic be flipped here?
- .all(|(non_zero_contour, even_odd_contour)| non_zero_contour.path == even_odd_contour.path);
+ .any(|(non_zero_contour, even_odd_contour)| non_zero_contour.path != even_odd_contour.path);
Contributor
Author
There was a problem hiding this comment.
Shoot sorry, forgot to push my latest before opening the PR 🙈 This expression ended up getting refactored, but should be semantically correct now
RickyDaMa
force-pushed
the
overlap-primitives
branch
from
July 29, 2026 08:38
5d287c0 to
be7ee00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds functions to concatenate
BezPaths, as well as functions that uselinesweeperto perform overlap removal & detection. In future PRs these can then be used to do overlap removal for statics (#717) and automatically set the overlap bit (#2061).Outstanding questions:
linesweepertypes internally within the fontc crates? Currentlylinesweeper::Erroris exposed.linesweeperuses1e-6by default.fontirneeding the overlap removal method andfontbeneeding overlap detection, so my rationale was that the logic should go in the "general utilities & types" crate.For the TODOs in code that talk about potential linesweeper features, I have opened an issue and a PR.