UILabel font : bold and italic

20,263

Solution 1

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...

Solution 2

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.

Share:
20,263

Related videos on Youtube

user7388
Author by

user7388

Updated on November 03, 2020

Comments

  • user7388
    user7388 over 3 years

    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.

    • filou
      filou over 11 years
    • Anoop Vaidya
      Anoop Vaidya over 11 years
      oops, spelling mistake in Arial... it was Ariel :( my bad luck... you can use other fonts from the link provided.
    • Scuttle
      Scuttle over 9 years
      Any one know what the System Font Bold answer is to this? I can't find where it says, "Apple System Font is ..."
  • Admin
    Admin over 11 years
    The first one won't do what OP wants - the 2nd call will overwrite the first and the font will be italic only.
  • Anoop Vaidya
    Anoop Vaidya over 11 years
    ok, i am removing that one :)