Akshay
Akshay

Reputation: 2983

Custom Fonts in Application

I have one font named ArnovalTCStd.otf which I want to use in my iPad application for some labels. How can I do it ?

Upvotes: 0

Views: 1405

Answers (3)

hardik hadwani
hardik hadwani

Reputation: 556

Copy your fonts in application's resources folder.

in info.plist file add new row with name Fonts provided by application it will be of type array
add item in it. write your font name in item's value example:-Birch.TTF

than in your code write following line:-

[label1 setFont:[UIFont fontWithName:@"Birch" size:36.0]];

Upvotes: 0

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31730

There hasn’t been an easy way to add custom fonts to your iPhone applications. As of iOS 4 it has become very easy to do. Here is what you need to do in order to add custom fonts:

Check How to include ttf fonts to iOS app

Upvotes: 3

Prasad_R
Prasad_R

Reputation: 557

Please make sure that your font is supported for iPad. Please use following loop to identify list of Font Family

for (NSString *familyName in [UIFont familyNames])
{
    NSLog(@"Font Family = %@", familyName);

    for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]){
        NSLog(@"\t%@", fontName);
    }
}

Upvotes: 4

Related Questions