5

I am experimenting with the new iOS 7 SpriteKit.

This line of code is taken from apple class reference and can be found in their sample project as well.

        SKLabelNode *label = [SKLabelNode labelNodeWithFontNamed:@"Chalkduster"];

In this line the Chalkduster font is used.

I understand it's a bitmap font but how do I know what other font name I can use to replace Chalkduster?

Michal Shatz
  • 1,416
  • 2
  • 20
  • 31
  • possible duplicate of [List of fonts that can be used with SpriteKit's labelNodeWithFontNamed method](http://stackoverflow.com/questions/19734855/list-of-fonts-that-can-be-used-with-spritekits-labelnodewithfontnamed-method) – Rafał Sroka Apr 19 '14 at 16:00

3 Answers3

3

You can also view the available fonts within Xcode itself by going to your storyboard file. You create a label there, go to the label's Attributes Inspector (the slider icon in the Utilities bar), select Font -> Custom, then scroll through the Family section to view the font list.

And here is how you would use a custom font of your own. Make sure you go through steps 1-5, then you should be able to use your custom font using [SKLabelNode labelNodeWithFontNamed:@"Font Name Here"].

Batalia
  • 2,425
  • 1
  • 17
  • 18
2

Here is a list of iOS 7 installed fonts

Andrey Gordeev
  • 30,606
  • 13
  • 135
  • 162
  • 5
    Also try this website: http://iosfonts.com/ it gives a nice list and indication of the availabiliy per iOS version. – rckoenes Jan 14 '14 at 08:38
0

I found that there is a very useful website showing all the available fonts on iOS. It’s iosfonts.com. The website shows how given font looks like, its name and its code name as well as the iOS version when specific font was added.

You can also log all the font names that are available as described here:

How to log names of all available fonts in iOS project.

Rafał Sroka
  • 39,540
  • 23
  • 113
  • 143