Home > DeveloperSection > Forums > Can I embed a custom font in an iPhone application?
Samuel Fernandes
Samuel Fernandes

Total Post:154

Points:1082
Posted on    April-25-2015 1:51 AM

 iPhone iPhone  Ios 
Ratings:


 1 Reply(s)
 383  View(s)
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?


Mayank Tripathi
Mayank Tripathi

Total Post:397

Points:3117
Supported
Posted on    April-25-2015 7:38 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick