I have added custom fonts to my resources and bundle resources and also to my plist. Everything works fine in iOS5 but when I try the iOS 4.3 simulator, none of the custom fonts work.
Any idea why?
Here is a sample of how I am accessing the fonts:
lblWait.font = [UIFont fontWithName:@"AvenirNextLTPro-Medium" size:22];
The names in that NSString in the first parameter have to be spot on and what's weird is that it's not consistent. It depends on if it's a .otf file or a .ttf file. I've found that a .otf file uses the postscript name and .ttf uses the full name. A good way to find these is to open the font file in Font Book and find it's information (cmd-I). I would try either to see what sticks.
Edit:
It's not always that the TTF uses the FULLNAME and the OTF uses the POSTSCRIPT name, you should try both.
Many times the source of this problem is that the font file is added to the project but not to the target.
Click on the font and make sure it's ticked in "Target Membership", in the right hand column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With