Embedding Custom Fonts in iOS [iPhone, iPad]

Though iOS 4 comes with a variety of fonts, you may want to include additional ones for an application.

Recently, we had to include Arial Black in our UIWebView for a card viewer application.

Here is how:

  1. You drag the *.ttf file into the Resources folder
  2. Add a row to the *-info.plist file called “UIAppFonts” (of type Array)
  3. It will change to say “Fonts provided by application”
  4. Add the full name of the font in the Array – i.e. “Arial Black.ttf”
  5. Now you can use the font in your HTML as you would regularly.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>