Since 2nd call CTFontCopySupportedLanguages returns nil for AppleColorEmoji
Originator: | an00na | ||
Number: | rdar://31246463 | Date Originated: | 24-Mar-2017 01:40 PM |
Status: | Duplicate of 31092774 (Open) | Resolved: | |
Product: | iOS + SDK | Product Version: | 10.3 |
Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Area: Foundation Summary: AFAIK, it only occurs for AppleColorEmoji font. The 1st CTFontCopySupportedLanguages call works as expected, returning an empty array. But since the 2nd time all calls of CTFontCopySupportedLanguages return nil, which is unexpected: 1. 2nd call differing from 1st call is already wrong. 2. Its doc says it returns "A retained reference to an array of languages supported by the font." 3. Its type annotation in Swift is (_: CTFont) -> CFArray, which causes crash since 2nd call on because nil is returned for non-optional type. Steps to Reproduce: Run the sample app and read the console logs. Relevant code is in -application:didFinishLaunchingWithOptions:. Code: https://cloudup.com/cEtBTbZ9i1c
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!