-1

I'm writing an application for the iPad and in there, I use a custom font. The custom font was added to my Mac Font Book and it shows up on the storyboard editor. I can also select the custom font on the editor and it will render it in the storyboard perfectly. The problem is when I load the app onto the simulator, it doesn't use the custom font, it uses the System font. This holds true for UILabel, UIButton, and UITextField but I haven't tested anything else.

Am I missing some settings or something?

FireDragonMule
  • 1,347
  • 2
  • 16
  • 27
  • You need to add the font in your info.plist file to be able to use it in the app. – atulkhatri Mar 27 '15 at 08:45
  • have you searched for the issue? http://stackoverflow.com/questions/22035985/custom-fonts-in-interface-builder – Jakub Vano Mar 27 '15 at 08:46
  • Yes, I did try to search for this. The question you linked specifically asks for the IB, which wasn't my problem (I was asking for the app). Even the dup question marked is of an older version of Xcode. I assumed that I didn't need to do that plist stuff but I was wrong and I still needed to do it. – FireDragonMule Mar 27 '15 at 16:35
  • And before you cry dupe, realize that none of the links posted on this thread has both Xcode 6 and loading a font onto an app. They are either an old version of XCode, or asking about the Interface Builder. – FireDragonMule Mar 27 '15 at 16:37

2 Answers2

5

Make sure your fonts copied to bundle when project compiled. To check that open Build Phases tab of you project settings. Inside Copy Bundle Resources section check if your fonts listed. If not press plus button and add them.

mustafa
  • 15,254
  • 10
  • 48
  • 57
0

You need to add the font in your info.plist file to be able to use it in the app.

Check these questions:

Use custom fonts in iPhone App

&

How to use custom fonts in iPhone SDK?

also make sure you search before posting any question on stackoverflow

Community
  • 1
  • 1
atulkhatri
  • 10,896
  • 3
  • 53
  • 89
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Alex Cio Mar 27 '15 at 10:27
  • Edited my answer but how can a linked page change? Please elaborate. – atulkhatri Mar 27 '15 at 10:30
  • 1
    Also I had already marked this question as a possible duplicate along with a comment if you can see above. – atulkhatri Mar 27 '15 at 10:32
  • This is the text which will be posted as a comment when reviewing posts. So keep focused on the part important for you ;) – Alex Cio Mar 27 '15 at 11:33
  • 1
    If you have flagged the question as a duplicate, then you clearly know the protocol for handling duplicate questions. Posting an answer in spite of this - especially one that just links to said duplicate and rats on the user - is just asking to get downvoted and flagged. – BoltClock Mar 27 '15 at 15:24
  • Also, since the posts you link to are Stack Overflow questions, one easy way for them to change is if someone edited or deleted any of the posts. – BoltClock Mar 27 '15 at 15:25