系统字体在 iOS 13 上呈现为 Times New Roman [英] System font renders as Times New Roman on iOS 13

查看:61
本文介绍了系统字体在 iOS 13 上呈现为 Times New Roman的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些带有默认系统字体的 UILabel.但是当我在 iPad 或 iPhone 上使用 iOS 13.1 安装我的应用程序时,字体会变成类似 Times New Roman 的东西!为什么会发生这种情况?我确定标签的文本是普通的,字体是 System.我该如何解决这个问题?

I have some UILabel with the default system font. But when I install my app on iPad or iPhone with iOS 13.1 the fonts change to something like Times New Roman! Why does this happen? I am sure the label's text is Plain and the font is System. How can I fix this issue?

PS:我已经从苹果网站下载了所有SF字体,还是没有成功!

PS: I have downloaded all SF fonts from Apple web site, and still no luck!

推荐答案

我找到了解决方案,问题在于检测当前标签的字体.我改了:

I found the solution, the problem comes with detecting the current label's font. I changed:

descriptions.font = UIFont(name: (descriptions.font?.fontName)!, size: 22)

descriptions.font = UIFont.systemFont(ofSize: 22)

问题解决了.

这篇关于系统字体在 iOS 13 上呈现为 Times New Roman的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆