0

In my app i need to add two fonts:

Insight_screen_Regular-e and Insight_screen_Bold-e

I have dragged and dropped them in the ttf formats to the Xcode project resources folder. In the application-info.plist file I have added the key "Fonts provided by application" to a new row and then added two items for added fonts.Then i built the project.

Yet i am unable to access these fonts from the xib files. What might be the reason. Thanks in advance.

nitin k m p
  • 329
  • 2
  • 22
  • How are you trying to access the fonts? Are you using `UIFont`'s `fontWithName:size:` selector? – kevboh May 21 '12 at 11:15
  • Also what do your "Fonts provided by application" values look like? – kevboh May 21 '12 at 11:17
  • i am using the xcode interface builder. I am unable to see the Insight fonts in the fonts list. – nitin k m p May 22 '12 at 13:33
  • From what I understand it won't be explicitly listed, although I've never done it through IB. Have you considered setting the font via code? – kevboh May 22 '12 at 16:13

2 Answers2

1

Read this answer.

You're probably not using the right string in fontWithName:size:. You need to use the PostScript name of the font in fontWithName:size:, which you can find by opening the font in Font Book on OS X, selecting the font, and pressing cmd+I.

Community
  • 1
  • 1
kevboh
  • 5,207
  • 5
  • 38
  • 54
0

From .m File I am using custom font like this

btnPhotoLibrary.titleLabel.font = [UIFont fontWithName:@"Hand Of Sean" size:18];

enter image description here

Warif Akhand Rishi
  • 23,920
  • 8
  • 80
  • 107