31

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ł Sroka
  • 39,540
  • 23
  • 113
  • 143
  • 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

47

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.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
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
  • 341
  • 4
  • 9