Possible Duplicate:
Can I embed a custom font in an iPhone application?
I am stuck in the following problem: I have to use the following font: Helvetica Neue LT Pro . Medium condensed and Bold condensed styles.
I first had them as otf files and I read somewhere that it might be better to have them as true-type fonts. So I converted them to .ttf files using http://www.freefontconverter.com/
What I did:
1) I added the fonts in my Resources bundle , checked to be sure they are listed in Copy Bundle Resources
section.
2) I added them in the Fonts provided by application
entry in Info.plist
with the complete name and extension of my 2 files : helveticaneueltprobdcn.ttf
and helveticaneueltpromdcn.ttf
3) I used this code to check the fonts were installed and get the name:
for (NSString *familyName in [UIFont familyNames])
{
NSLog(@"----------------");
NSLog(@"FAMILY: %@", familyName);
for(NSString *fontName in [UIFont fontNamesForFamilyName:familyName])
{
NSLog(@" %@", fontName);
}
}
4) The fonts were listed there , like this:
FAMILY: Helvetica Neue LT Pro
HelveticaNeueLTPro-MdCn
HelveticaNeueLTPro-BdCn
5) Still not working when trying to use [UIFont fontWithName:@"HelveticaNeueLTPro-BdCn" size:16]
. It's not the font that I asked for , I guess it does not find it and uses the system default. If I change the size , there's no change - I can use size 16 or 46 , the result is the same.
6) I tried deleting and re-installing the app , clean project in XCode , everything I could think of.
Does anyone have any idea why this wouldn't work? I googled a lot and I couldn't find a solution. If it matters , I'm using XCode 4.3.2 , iOS SDK 5.1 and running on an iPad with iOS 5.1.1 installed.
Thank you.
Regards,
George