You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you can set a value for NSKernAttributeName with .tracking(.point(10)) or .tracking(.adobe(100)) (for example). Passing nonzero values affects the tracking (overall letter spacing over a range). Passing 0 disables the font's built-in kerning, which is almost definitely what you didn't want to do. What you can't do at all is pass NSNull() or remove the key, either of which will (I believe) use the font's default kerning. This is the UIKit default (question: what about AppKit?). If you override tracking in a style, and you nest a style inside it, you should be able to set the value back to the default. We should be able to test how things work by measuring strings in a unit test.
Depending on what we find through testing, I propose we add either the first or both of these cases to Tracking:
case `default` // sets it to NSNull()
case disabled // removes the key entirely
I'm guessing we'll only need one of these, since they should be synonymous, but we should test to confirm.
The text was updated successfully, but these errors were encountered:
Currently, you can set a value for
NSKernAttributeName
with.tracking(.point(10))
or.tracking(.adobe(100))
(for example). Passing nonzero values affects the tracking (overall letter spacing over a range). Passing 0 disables the font's built-in kerning, which is almost definitely what you didn't want to do. What you can't do at all is passNSNull()
or remove the key, either of which will (I believe) use the font's default kerning. This is the UIKit default (question: what about AppKit?). If you override tracking in a style, and you nest a style inside it, you should be able to set the value back to the default. We should be able to test how things work by measuring strings in a unit test.Depending on what we find through testing, I propose we add either the first or both of these cases to
Tracking
:I'm guessing we'll only need one of these, since they should be synonymous, but we should test to confirm.
The text was updated successfully, but these errors were encountered: