0

i am Newbie in iOS Development. I want to set a custom font to my Label. For that, I add my Font.ttf file in my project and add it to info.plist File "Fonts provided by application" My Font Name. Also I check in my Project Build Phases "Copy Bundle Resources" that contain my Font.ttf name but label font are not change please give me solution for it.

Code for it like as

[cell.headLabel setFont:[UIFont fontWithName:@"RobotoCondensed-Bold" size:10.0f]];
Ramesh
  • 177
  • 1
  • 3
  • 18
  • Can you post some code on how are you changing the UILabel's font? – Marcos Crispino Dec 15 '14 at 15:41
  • All of the solutions are in the previous question that is linked. I'm guessing you have the font name (identifier) wrong. Use the solution to list out the names or use the new Xcode 6 way and set it at design time, all in the answers to the previous question. – Marcus Adams Dec 15 '14 at 15:49

2 Answers2

0

There are ton of examples online for doing this. A quick google search turns up this:

http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

Sandy Chapman
  • 11,133
  • 3
  • 58
  • 67
0

Take a look at this:

http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

Try logging all the fonts to your console and see if yours is listed:

for (NSString* family in [UIFont familyNames])
{
    NSLog(@"%@", family);

    for (NSString* name in [UIFont fontNamesForFamilyName: family])
    {
        NSLog(@"  %@", name);
    }
} 
Sandy D.
  • 3,166
  • 1
  • 20
  • 31