Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where Can I Find Sprite Kit Available fonts?

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?

like image 379
Michal Shatz Avatar asked Jan 14 '14 08:01

Michal Shatz


2 Answers

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"].

like image 54
Batalia Avatar answered Oct 13 '22 04:10

Batalia


Here is a list of iOS 7 installed fonts

like image 40
Andrey Gordeev Avatar answered Oct 13 '22 04:10

Andrey Gordeev