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

Set miter limit for anchor name #1

Open
florianpircher opened this issue Nov 30, 2022 · 0 comments
Open

Set miter limit for anchor name #1

florianpircher opened this issue Nov 30, 2022 · 0 comments

Comments

@florianpircher
Copy link
Owner

When drawing certain letter shapes of an anchor name, the stroke might create undesirable spikes:

Setting a miter limit is how such cases are typically controlled, but in this case, there does not seem to be exist Apple-provided API for configuring the miter limit of an attributed string. The only two stroke settings for NSAttributedString are NSStrokeColorAttributeName and NSStrokeWidthAttributeName.

This issue could be resolved by getting the Bézier path of the text and drawing it manually since NSBezierPath and Core Graphics both offer miter limits.

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

No branches or pull requests

1 participant