How to include and use new fonts in iPhone SDK?

  1. Add the font files to your resource files
  2. Edit your Info.plist: Add a new entry with the key Fonts provided by application.
  3. For each of your files, add the file name to this array

On the example below, I’ve added the font “DejaVu Sans Mono”:

Info.plist: adding custom fonts

In your application you can the use [UIFont fontWithName:@"DejaVuSansMono-Bold" size:14.f].

Or if you want to use it in html/css, just use font-family:DejaVu Sans Mono;

Note: this is available in iOS 3.2 and later.

Leave a Comment