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

Fix SFSymbol NonZero winding paths on macOS #33

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

swhitty
Copy link
Owner

@swhitty swhitty commented Nov 14, 2023

SFSymbols do not support the evenodd fill rule and are automatically converted to the nonzero winding rule by SwiftDraw.

SwiftDraw currently uses a primitive method to detect if a subpath is "inside" another path when winding that can cause issues when subpaths are positioned in close proximity:

image

This PR leverages CGPath.contains when available to fix the issue on Darwin platforms.

Resolves issue #32 on Darwin platforms falling back to CoreGraphics.

@swhitty swhitty merged commit 1b993a4 into main Nov 14, 2023
9 of 11 checks passed
@swhitty swhitty deleted the fix-winding-path branch November 14, 2023 11:36
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.

1 participant