UIFont fontWithName font name

Solution 1:

Might be interesting for you as Quick Win within the Debugger:

(lldb) po [UIFont fontNamesForFamilyName:@"Helvetica Neue"]

(id) $1 = 0x079d8670 <__NSCFArray 0x79d8670>(
HelveticaNeue-Bold,
HelveticaNeue-CondensedBlack,
HelveticaNeue-Medium,
HelveticaNeue,
HelveticaNeue-Light,
HelveticaNeue-CondensedBold,
HelveticaNeue-LightItalic,
HelveticaNeue-UltraLightItalic,
HelveticaNeue-UltraLight,
HelveticaNeue-BoldItalic,
HelveticaNeue-Italic
)

November 2018 - Update A new swift-y reference for "Custom Fonts with Xcode" - by Chris Ching. I had to update, as this is a great value posting for the new way combined with all missing parts to use custom fonts in a project.

Solution 2:

The documentation for UIFont is pretty clear on this:

You can use the fontNamesForFamilyName: method to retrieve the specific font names for a given font family. (Note: It is a class method)

You can get the family names like this:

NSArray *familyNames = [UIFont familyNames];

Solution 3:

Try

NSArray *familyNames = [UIFont familyNames];
[familyNames enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop){
    NSLog(@"* %@",obj);
    NSArray *fontNames = [UIFont fontNamesForFamilyName:obj];
    [fontNames enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop){
        NSLog(@"--- %@",obj);
    }];
}];