Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SKlabelNode custom font

Tags:

ios

sprite-kit

I know I can create a custom font using this code:

[UIFont fontWithName:@"bebas-neue" size:10];

But if I want to create an SKLabelNode, how can I set this as the font?

SKLabelNode only takes a string as the fontName.

like image 632
Max Hudson Avatar asked Dec 06 '25 14:12

Max Hudson


1 Answers

The procedure is essentially the same as for UIFont.

To do this from scratch, follow the same process as for adding a custom UIFont (described here), then just use:

[SKLabelNode labelNodeWithFontNamed:@"Font Name Here"]
like image 139
Batalia Avatar answered Dec 08 '25 06:12

Batalia