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!
The default iOS font is SF, or San Francisco.
To manage installed fonts, go to Settings > General, then tap Fonts.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With