I've been playing around with custom fonts in iOS and have got most of it figured out apart from the custom font won't show on any of my devices.
- I have added the font to the root of the project file.
- Added it to the info.plist file under the array or "Fonts provided by application"
- Checked that the case sensitivity of both the original file and what I added to the info.plist file are the same.
- Used
[playMenuBtn.titleLabel setFont:[UIFont fontWithName:@"fontname" size:40]];
to make the font work.
When I run my app in the Simulator it all appears fine and works. However as soon as I run it on a physical device, it displays the default font with the default size.
If I use:
UIFont *font = [UIFont fontWithName:@"VINCASTENCIL" size:20];
NSLog(@"Font:%@", font);
Then the simulator returns:
2012-04-07 01:10:41.544 AppName[47412:f803] Font:<UICFFont: 0x683e040> font-family: "VINCA STENCIL"; font-weight: normal; font-style: normal; font-size: 20px
Where as the device returns:
2012-04-07 00:42:56.358 AppName[5079:707] Font:(null)
I have tried everything, including trying all the names that FontBook tells me the font could be named. I know it's free and there isn't a licence on it.
Any help would be greatly appreciated as it's driving me nuts and I really don't want to use images for al of these as localisation would then be a pain!