Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom fonts to an iPhone app?

Tags:

iphone

fonts

What must I do to get an UIFont object with a custom font? I remember there was also something going on in the Info.plist file.

What font file formats are supported?

like image 886
openfrog Avatar asked Oct 01 '10 09:10

openfrog


1 Answers

To add a custom font to your application, you can add them to the XCode project. Then, modify the application-info.plist file. Add the key Fonts provided by application to a new row. Add one item for each font you have added.

It supports both TTF and OpenType fonts. One caveat is that it loads and parses all fonts in the startup of your app, so it will slow down the initial load time.

I believe this is only available in iOS 3.2 or later.

like image 112
jschmidt Avatar answered Sep 17 '22 12:09

jschmidt