As the title states - I would like to make my SKLabelNode
bold programmatically.
How do I go about this?
For SKLabelNode's you need to use:
var labelNode = SKLabelNode()
labelNode = SKLabelNode(fontNamed: "AvenirNext-Bold")
or
var labelNode = SKLabelNode()
labelNode.fontName = "AvenirNext-Bold"
You can't set the SKLabelNode itself to bold. You have to use a Bold Font.
But if you want to use a custom font, you have to use one which is available in bold:
skLabel.fontName = "YourFontName-Bold"
skLabel.fontSize = 14
To get all fonts which are available on iOS check this site: http://iosfonts.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With