0

I was able to change the font of the tableViewCell text using this code

    cell.textLabel?.font = UIFont(name: "Snell Roundhand", size: 40)

However i would also like to make this font bold, so far I've tried to do this by using this code cell.textLabel?.font = UIFont.boldSystemFontOfSize(40)

Although this does change the font to be bold, it also changes the font back to the standard one and not "Snell Roundhand".

Any idea on why this is? and how to resolve this?

Many thanks Kieran

Kieran
  • 77
  • 1
  • 8
  • Also, boldSystemFontOfSize and its related methods will always return the SystemFont, which is HelveticaNeue-Light, I believe. Thus, you aren't "adding" bold to your existing font, rather, you are replacing your font completely by the SystemFont. – benhameen May 22 '15 at 21:53
  • Ahhh ok, thats where i was going wrong >.< thanks alot for your explanation! :) – Kieran May 22 '15 at 21:55

1 Answers1

1

You're using the regular font name. To use the bold variation of the font, use this code:

cell.textLabel?.font = UIFont(name: "SnellRoundhand-Bold", size: 40)
Ron.Kliffer
  • 248
  • 1
  • 9