kFractionsType : kDiagonalFractionsSelector automatic setting in System font is broken when system language is Chinese and Japanese
| Originator: | Tim.QiYang | ||
| Number: | rdar://23381005 | Date Originated: | 03-Nov-2015 |
| Status: | Open | Resolved: | No |
| Product: | iOS SDK | Product Version: | iOS 9.1 (13B143) |
| Classification: | Interface | Reproducible: | Always |
Summary: When automatic diagonal fraction is enabled for a UIFont, the displayed text looks broken when system language is set to Chinese or Japanese. Tested in UILabel and UIButton on iOS 9.1 Steps to Reproduce: set font of UILabel or UIButton to a UIFont with kDiagonalFractionsSelector enabled: (see attached project) sample code: let systemFontDesc = UIFont.systemFontOfSize(28, weight: UIFontWeightLight).fontDescriptor() let fractionFontDesc = systemFontDesc.fontDescriptorByAddingAttributes( [ UIFontDescriptorFeatureSettingsAttribute: [ [ UIFontFeatureTypeIdentifierKey: kFractionsType, UIFontFeatureSelectorIdentifierKey: kDiagonalFractionsSelector]]]) let diagonalFont = UIFont(descriptor: fractionFontDesc, size:28) label.font = diagonalFont then set label.text = "11/22" run the code on iOS with system language set to Chinese or Japanese Expected Results: displayed text should automatically have proper diagonal fraction form, in 11/22, 11 should be superscript, 22 should be subscript, kerning should be adjusted, special diagonal glyph is used. Actual Results: (see attached screenshot) when language is set to Chinese or Japanese, all numbers are in superscript in the fraction, kerning is incorrect, too wide. Normal diagonal glyph is used.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!