IOS 5 custom fonts

I added custom fonts to my resources and linked resources as well as with my plist. Everything works fine in iOS5, but when I try to use the iOS 4.3 simulator, none of the custom fonts work.

Any idea why?

Here is an example of how I access fonts:

lblWait.font = [UIFont fontWithName:@"AvenirNextLTPro-Medium" size:22];
+5
source share
2 answers

The names in this NSString in the first parameter must be exact, and what is strange is that it is not consistent. It depends on whether it is a .otf file or a .ttf file. I found that the .otf file uses the postscript name and the .ttf uses the full name. A good way to find this is to open the font file in the Font Book and find its information (cmd-I). I would try to see which sticks.

enter image description here

Edit:

, TTF FULLNAME, OTF POSTSCRIPT, .

+24

, , .

, " " .

+9

All Articles