Cannot use custom font in iPhone application.

I have 3 .ttf files in an application for iPhone. They represent these 3 fonts:

  • Gotham Rounded Book
  • Gotham rounded medium
  • Gotham rounded bold

I put all of them in my .plist, but only 2 will appear when I do this:

NSLog(@"%@",[UIFont fontNamesForFamilyName:@"Gotham Rounded"]); 

This is what is logged:

 "GothamRoundedMedium-Regular", "GothamRoundedBook-Regular" 

What's going on here? Screenshots below.

enter image description here

enter image description here

+4
source share
1 answer

Perhaps this is due to the fact that you did not include gothamroundedbold.ttf in your target, as in the image. Select the help navigator. Check the membership of a font file that is missing. In my case, this is checked, and in your case it must be removed. enter image description here `

+1
source

Source: https://habr.com/ru/post/1414216/


All Articles