How to use custom fonts in iPhone SDK?

Patel Manthan picture Patel Manthan · Jan 17, 2013 · Viewed 50.2k times · Source

I Want to implement custom font in my app. So i have added that in my Project Source code. I don't want to set that programatically. Is this possible that I can do this with setting properties in xib?

Answer

Rajneesh071 picture Rajneesh071 · Jan 17, 2013
  1. Add your custom font into your project , i.e. Dragged the font file(CALIBRIZ_0.TTF) into XCode project.

  2. Edit 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

    enter image description here

  4. Opened the font in font book(double click on your font in finder) to see what the real filename is and I see this:

enter image description here

Now set font to your label

yourLabel.font = [UIFont fontWithName:@"Calibri" size:15];

Follow this to get more