How to set UIFont to bold?

I checked the documentation but nothing came up. I am able to set the family name and size with [UIFont fontWithName:@"Arial" size:17]; but how do I make it bold?

Posted on May 24, 2008 6:11 PM

Reply
3 replies

Jun 7, 2008 4:47 PM in response to aapl.crox

You need to pass in the name of the specific font within the family. Use the "fontNamesForFamilyName" method of UIFont to get a list of names.

The naming scheme is not consistent. Here are some examples of bold font names:

"Helvetica-Bold"
"TimesNewRomanPS-BoldMT"
"Arial-BoldMT"
"CourierNewPS-BoldMT"
"Georgia-Bold"

Message was edited by: Tom Peck

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to set UIFont to bold?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.