In Introducing the new system fonts, the following screen shot was shown. Which UIFontDescriptorFeatureSettingsAttribute is used to enable this behaviour?
Asked
Active
Viewed 204 times
1 Answers
1
In case anyone else is struggling with this, here's the feature I found which will activate it:
let descriptor = UIFont.systemFontOfSize(24.0, weight: UIFontWeightLight).fontDescriptor()
let adjusted = descriptor.fontDescriptorByAddingAttributes(
[
UIFontDescriptorFeatureSettingsAttribute: [
[
UIFontFeatureTypeIdentifierKey: kCaseSensitiveLayoutType,
UIFontFeatureSelectorIdentifierKey: kCaseSensitiveLayoutOnSelector
]
]
]
)
return UIFont(descriptor: adjusted, size: 24.0)

Trevor Squires
- 531
- 4
- 7