Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font style gets changed issue in Xcode 11 Beta

  1. Create a new or open existing project in Xcode 11 Beta.
  2. Create UILabel with Plain text and keep the System font with Regular style.

enter image description here

  1. Change text type to Attributed String and check font style, seems it changes with different font style and doesn't keep the same.

enter image description here

PS: In Xcode 10 work fine.

like image 982
Harshal Wani Avatar asked Jun 06 '19 03:06

Harshal Wani


People also ask

How do you change your font on iPhone 12?

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


1 Answers

As per Apple's official document https://developer.apple.com/fonts/

SF Pro:

This sans-serif typeface is the system font for iOS, macOS, and tvOS, and includes a rounded variant. It provides a consistent, legible, and friendly typographic voice.

SF Compact:

This sans-serif typeface is the system font for watchOS, and includes a rounded variant. It suits a wide range of content and is easily legible in a variety of contexts.

So we need to download and install SF Pro font and set UILabel attributed string font style with SF Pro Text Regular 18.0 to keep the same font style like Plain text have.

Hope this will help you!

Cheers!

like image 60
Harshal Wani Avatar answered Oct 18 '22 05:10

Harshal Wani