I cant get my .ttf file to work in my iPhone app. I added this file to my project:
gothamnarrowbook.ttf
I added this to my plist:
<key>UIAppFonts</key>
<array>
<string>gothamnarrowbook.ttf</string>
</array>
And in my ViewController, I added this:
UIFont *gnb = [UIFont fontWithName:@"gothamnarrowbook" size:22];
But gnb is nil. What am I doing wrong?
Unfortunately, the actual ‘name’ of the font you reference in the .plist isn’t necessarily the same as its file-name.
To find out the real name of the font, open it in Font Book, and you should be able to see it’s real name. Maybe the actual name is “Gotham Narrow Book”, or something like that, Font Book will tell you.
Check out this blog post to find out more.
Also note that: