0

I'm struggling with custom fonts. I'm using Xcode 6.3 and iOS 8.3. As in other application I do this steps:

  1. Import MerriweatherSans-Regular.ttf (added to target) enter image description here
  2. Added MerriweatherSans-Regular.ttf in Info.plist with key Fonts provided by application

But if try to print all fonts available Merriweather never comes out

for (NSString* family in [UIFont familyNames])
{
    NSLog(@"%@", family);

    for (NSString* name in [UIFont fontNamesForFamilyName: family])
    {
        NSLog(@"  %@", name);
    }
}

The strange is with Xcode 6.1 all works fine.

Fry
  • 6,235
  • 8
  • 54
  • 93
  • Do you have that problem with TextField or TextView? I had some similar issue. – EnriMR Apr 22 '15 at 14:15
  • "added to target" Can you prove that? – matt Apr 22 '15 at 14:24
  • Sure... see the image added in my edit – Fry Apr 23 '15 at 08:38
  • Maybe you are using the wrong font name in your code. Click your font file and open the file inspector. It should have a "Full Name" property. Use that name as the font name in your code. –  Apr 27 '15 at 13:51

1 Answers1

0

I don't know why xcode 6.3 has this strange behavior but your font will appear in the list when you use it somewhere in XIB.

Merlin
  • 213
  • 1
  • 9