Set "SF UI Display Bold" as label font Set "SF UI Display Bold" as label font ios ios

Set "SF UI Display Bold" as label font


Theoretically you could use the font by calling its font name directly. The font name for that font is .SFUIDisplay-Bold.

However Apple discourages this approach and says that these font names are private and subject to change at any time.

The official way to use the San Francisco fonts is to call systemFont which automatically gives you the San Francisco font:

let font = UIFont.systemFont(ofSize: 17)

To get a lighter or bolder font you can request the font weight:

let mediumFont = UIFont.systemFont(ofSize: 17, weight: UIFont.Weight.medium)let lightFont = UIFont.systemFont(ofSize: 17, weight: UIFont.Weight.light)let boldFont = UIFont.systemFont(ofSize: 17, weight: UIFont.Weight.bold)

There is a ton of font weights to choose from:

UIFont.Weight.ultraLightUIFont.Weight.thinUIFont.Weight.lightUIFont.Weight.regularUIFont.Weight.mediumUIFont.Weight.semiboldUIFont.Weight.boldUIFont.Weight.heavyUIFont.Weight.black


As per Joern's answer updated for Swift 4:

let font = UIFont.systemFont(ofSize: 17)let mediumFont = UIFont.systemFont(ofSize: 17, weight: UIFont.Weight.medium)let lightFont = UIFont.systemFont(ofSize: 17, weight: UIFont.Weight.light)let boldFont = UIFont.systemFont(ofSize: 17, weight: UIFont.Weight.bold)

Also see Apple Documentation