Can I embed a custom font in an iPhone application?

Total Post:159

Points:1117
iPhone  Ios 
 929  View(s)
Ratings:
Rate this:
This question relates to iOS pre-3.2. As of 3.2 this functionality is easily achievable using samvermette's answer below.

I would like to have an app include a custom font for rendering text, load it, and then use it with standard UIKit elements like UILabel. Is this possible?
  1. Post:397

    Points:3117
    Re: Can I embed a custom font in an iPhone application?

    Copy your font file into resources

    Add a key to your Info.plist file called UIAppFonts. ("Fonts provided by application)

    Make this key an array

    For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array

    Save Info.plist

    Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:15] to get the custom font to use with your UILabels and UITextViews, etc

Answer