Reputation: 433
I have the same issue as described here
I have a font called ANTIQUAA.TTF. This font is added to Supporting Files of the project. In my app plist I have entry Fonts provided by application and ANTIQUAA.TTF is added there.
I can't use this font in the app. When I run this method I can't see the font.
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]];
NSArray *fontNames;
NSInteger indFamily, indFont;
for (indFamily=0; indFamily<[familyNames count]; ++indFamily)
{
NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]);
fontNames = [[NSArray alloc] initWithArray:
[UIFont fontNamesForFamilyName:
[familyNames objectAtIndex:indFamily]]];
for (indFont=0; indFont<[fontNames count]; ++indFont)
{
NSLog(@" Font name: %@", [fontNames objectAtIndex:indFont]);
}
[fontNames release];
}
[familyNames release];
What am I missing ?
Upvotes: 0
Views: 1367
Reputation: 1406
push the add button in "Copy Bundle Resources" and click on the font files.
Upvotes: 4
Reputation: 6658
Looks like you just need to add the font resource to your .plist file.
Open your plist as text and paste:
<key>UIAppFonts</key>
<array>
<string>ANTIQUAA.TTF</string>
</array>
Upvotes: 2