1

In Introducing the new system fonts, the following screen shot was shown. Which UIFontDescriptorFeatureSettingsAttribute is used to enable this behaviour?

Click me

luk2302
  • 55,258
  • 23
  • 97
  • 137

1 Answers1

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