Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of fonts that can be used with SpriteKit's labelNodeWithFontNamed method

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"];
like image 829
Rafa de King Avatar asked Nov 01 '13 20:11

Rafa de King


2 Answers

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.

like image 117
LearnCocos2D Avatar answered Nov 18 '22 21:11

LearnCocos2D


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);
    }
}
like image 28
Alex Avatar answered Nov 18 '22 21:11

Alex