知道下面是什么意思吗?我们不要求.AppleColorEmojiUI
!任何带有表情符号的NSAttributedString
最终都会在控制台中显示此信息。
CoreText note: Client requested name ".AppleColorEmojiUI", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
在属性检查器中检查属性文本是否设置为支持的字体。 苹果系统字体 就我而言,当我复制文本时,字体设置为系统字体常规 17.0。 即使我从属性文本切换到纯文本,并将代码中的字体设置为 .body,仍然发生错误。设置符号断点,您可以看到正在传递的字体是#%,并且错误发生在viewDidLoad执行之前,我尝试设置字体。使用有效的默认字体,切换到纯文本或属性文本运行时不会出现错误。