Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use custom font

Tags:

xcode

iphone

ios4

How to use custom font?(font that doesn't exist in iphone)


2 Answers

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

UIAppFonts description.

like image 103
vfn Avatar answered Mar 20 '26 11:03

vfn


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.

original font name [LblTwitter setFont:[UIFont fontWithName:@"The Great Escape" size:12]];

Note: this is available in iOS 4.0 and later.

like image 26
Mak Avatar answered Mar 20 '26 10:03

Mak