Has anyone had success using custom otf fonts on the iPhone?

For my own project I wanted to use the opentype font and I basically used this method:

Add your custom font file into your project using XCode as a resource
Add a key to your info.plist file (Fonts provided by application)
For each font you have, enter the full name of your font file (including the extension)
save info.plist
then use this for your labels (ex:)

UIFont* font = [UIFont fontWithName:@"Harrowprint" size:20];

In my case @"Harrowprint" was the filename without the extension and not the font name provided by Finder.

My font was an otf and it worked…so I guess it’s supported…or I was lucky. I’ll test another font..and keep you posted..

references:

  • http://blog.beefyapps.com/2010/06/custom-fonts-in-ios-4/
  • Can I embed a custom font in an iPhone application?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)