7

Possible Duplicate:
How do I set bold and italic on UILabel of iPhone/iPad?

I am trying to make UILabel font bold and italic both using system font, but I cant use these both style at a time. so is it possible to make font bold and italic using system font? here is my code,

lblTitle.font = [UIFont italicSystemFontOfSize:[UIFont systemFontSize]]; 

or

lblTitle.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]];

I want my font Bold and Italic both. Can anyone help me? Thank you in advance.

Community
  • 1
  • 1
user7388
  • 1,741
  • 2
  • 19
  • 25
  • 1
    Maybe this could help: http://stackoverflow.com/questions/4713236/how-do-i-set-bold-and-italic-on-uilabel-of-iphone-ipad – filou Dec 24 '12 at 09:25
  • oops, spelling mistake in Arial... it was Ariel :( my bad luck... you can use other fonts from the link provided. – Anoop Vaidya Dec 24 '12 at 10:01
  • Any one know what the System Font Bold answer is to this? I can't find where it says, "Apple System Font is ..." – Scuttle Oct 22 '14 at 20:54

2 Answers2

17

try this code...

UIFont *yourFont = [UIFont fontWithName:@"Helvetica-BoldOblique" 
                                   size:[UIFont systemFontSize]];
lblTitle.font = yourFont;

you can use also another fontName for BoldItalik like.

Optima-BoldItalic,TimesNewRomanPS-BoldItalicMT,Baskerville-BoldItalic,HelveticaNeue-BoldItalic,etc...

Alex Cio
  • 5,752
  • 4
  • 40
  • 73
Paras Joshi
  • 19,954
  • 11
  • 54
  • 69
6

There are several font that contains Bod+Italic in themselves you can use those fonts... One frequently for an example is

lblTitle.font = [UIFont fontWithName:@"Arial-BoldItalicMT" size:16.0f];

others are :

- TrebuchetMS-Bold

- Helvetica-BoldOblique

- This link will help you.

Vikas S Singh
  • 1,727
  • 1
  • 14
  • 29
Anoop Vaidya
  • 45,475
  • 15
  • 105
  • 134