30

How can I get the list of font names that can be used with SpriteKit's labelNodeWithFontNamed method?

There is a method of SKLabelNode where I can specify the font name but I would like to know which fonts are supported and what are their names.

Example:

[SKLabelNode labelNodeWithFontNamed:@"Chalkduster"];
Rafa de King
  • 38,474
  • 23
  • 108
  • 138
  • 1
    Check this link [How to check if a font is available in version of iOS?](http://stackoverflow.com/questions/8529593/how-to-check-if-a-font-is-available-in-version-of-ios) – Nekak Kinich Nov 01 '13 at 20:45

2 Answers2

46

Refer to iosfonts.com They show you how the actual font looks like, it's descriptive name and its code name as well as the iOS version a specific font was added.

Use only the code names of each font, like AmericanTypewriter-CondensedLight.

LearnCocos2D
  • 64,083
  • 20
  • 128
  • 214
3

Try to get your fonts with names by this code:

for (NSString* family in [UIFont familyNames]) {
    NSLog(@"%@",family);
    for (NSString* name in [UIFont fontNamesForFamilyName:family]) {
        NSLog(@"--- %@",name);
    }
}
Alex
  • 311
  • 4
  • 9