About Me

My photo
Drum & Bass Producer, Software Developer, Love my Cats

How to use a custom font in my iPhone app

I received some custom fonts from the designer to use in an iPhone app I'm developing.
Stackoverflow gave some ideas, and the best method I found is this:

1. Convert font file to TTF using this online tool: http://www.freefontconverter.com/
2. Add the TTF files to your project
3. Make some configurations to your info.plist file:
3.1 Edit info.plist as source code (right click on file -> open as -> source code)
3.2 Add this:


<key>UIAppFonts</key>
<array>
<string>font1.ttf</string>
<string>font2.ttf</string>
...etc...
</array>


3.3 Your info.plist should have this now:


4. Use the new fonts just like the system fonts:

[UIFont fontWithName:@"font1" size:16.0];

(Notice no ".ttf" in the font name)

Good luck using your own fonts in your iphone app!