Hi, I struggle to use the alterante six and nine of the San Francisco Compact Font in my Watch App. Can anybody tell me how to use them in Swift?
I use this code in my iOS-App but it fails on the WatchKit:
func alternateNumberfont() {
let bodyFontDescriptor = UIFontDescriptor.preferredFontDescriptorWithTextStyle(UIFontTextStyleBody)
let bodyAltStyle1Descriptor = bodyFontDescriptor.fontDescriptorByAddingAttributes(
[
UIFontDescriptorFeatureSettingsAttribute: [
[
UIFontFeatureTypeIdentifierKey: kStylisticAlternativesType,
UIFontFeatureSelectorIdentifierKey: kStylisticAltOneOnSelector
]
]
])
let altStyle1BodyFont = UIFont(descriptor: bodyAltStyle1Descriptor, size: 12.0)
maxDrawDist.font = altStyle1BodyFont
}