Reputation:
How to use custom font?(font that doesn't exist in iphone)
Upvotes: 3
Views: 2089
Reputation: 46
Ex. Add the font files to your resource files Edit your Info.plist: Add a new entry with the key Fonts provided by application. For each of your files, add the file name to this array
First you can install a custom font in your app pick original font name then rename your font file name.
[LblTwitter setFont:[UIFont fontWithName:@"The Great Escape" size:12]];
Note: this is available in iOS 4.0 and later.
Upvotes: 1
Reputation: 4345
You will have to include your font file in your project and update the keys in info.plist after that you can use that font by name see this link
Upvotes: 0
Reputation: 6066
Since you mention iphone-sdk-4.0
as one of your tags, it means that you can use the UIAppFonts
key on your app. UIAppFonts
was introduced on iOS 3.2.
The key to be added on your property list: http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW3
Upvotes: 5