Difference between .SFUI-Regular and SF-PRo

Hello,

The system font for iOS is SF-Pro, as mentioned here: https://developer.apple.com/design/human-interface-guidelines/typography.

"SF Pro is the system font in iOS and iPadOS."

However, when I print the font, created with `[UIFont systemFontOfSize:18.0 weight:UIFontWeightRegular], I get the following info:

<UICTFont: 0x114f1f400> font-family: ".SFUI-Regular"; font-weight: normal; font-style: normal; font-size: 18.00pt.

If SF-Pro is the system font , shouldn't the font family be some variation of SFPro?

How come it prints font-family: ".SFUI-Regular"

Thank you

The system font is San Francisco however it’s handled differently than other installed fonts. For example you can’t search for it by name, and it won’t show up in the list of installed fonts. This is because the system font can and has changed in the past. Ideally you would like to write your code without assuming the system font is San Francisco. You should also not make my assumptions about the font name specifics, like pro vs regular. These details can change at any time.

San Francisco is also unique because it has optical variants, Text and Display. The system picks which variant to use based on the point size. 19 pt and lower uses text, 20 and higher uses display. In general you don’t pick the variant manually; just use the syatem font and set the point size and the system does the rest.

Doug Hill

https://github.com/djfitz/SFFontFeatures

Difference between .SFUI-Regular and SF-PRo
 
 
Q