0

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 ?

Community
  • 1
  • 1
OhDoh
  • 433
  • 2
  • 9
  • 22
  • Possible (but sort of like a meta-)duplicate: http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application – CodaFi Mar 10 '12 at 20:45

2 Answers2

4

push the add button in "Copy Bundle Resources" and click on the font files.

enter image description here

Floris497
  • 1,406
  • 12
  • 18
2

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>
Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58