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

Support stroked text #281

Open
ZevEisenberg opened this issue Apr 21, 2017 · 1 comment
Open

Support stroked text #281

ZevEisenberg opened this issue Apr 21, 2017 · 1 comment

Comments

@ZevEisenberg
Copy link
Collaborator

I don't know whether there is a big demand for these (signs point to "no"), but I wanted to log it here in case someone wants it. Specifically, we should use an enum or something to abstract over this nonsense: https://developer.apple.com/library/content/qa/qa1531/_index.html.

@ZevEisenberg
Copy link
Collaborator Author

In case that URL goes dark:

Q: How can I draw a string that specifies both a fill color and a stroke width?
A: Supply a negative value for NSStrokeWidthAttributeName when you wish to draw a string that is both filled and stroked.

This is because the sign of the value for NSStrokeWidthAttributeName is interpreted as a mode; it indicates whether the attributed string is to be filled, stroked, or both. Specifically, a zero value displays a fill only, while a positive value displays a stroke only. A negative value allows displaying both a fill and stroke.

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

No branches or pull requests

1 participant