Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System font renders as Times New Roman on iOS 13

Tags:

xcode

ios

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: I have downloaded all SF fonts from Apple web site, and still no luck!

like image 236
iOS.Lover Avatar asked Oct 04 '19 12:10

iOS.Lover


People also ask

What is iOS 13 default font?

The default iOS font is SF, or San Francisco.

Can you change the system font on iPhone?

To manage installed fonts, go to Settings > General, then tap Fonts.

What font is system font iOS?

SF Pro. This neutral, flexible, sans-serif typeface is the system font for iOS, iPad OS, macOS and tvOS. SF Pro features nine weights, variable optical sizes for optimal legibility, four widths, and includes a rounded variant. SF Pro supports over 150 languages across Latin, Greek, and Cyrillic scripts.


1 Answers

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)

to

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

and problem solved.

like image 157
iOS.Lover Avatar answered Sep 27 '22 18:09

iOS.Lover