Timmy Timmy - 3 months ago 23x
iOS Question

SpriteKit SKLabelNode font size to pixels

What's a clean way to use SKLabelNode's fontSize to map to pixels? I'm trying to place text inside a box that fits in a fixed box proportionately.


According to apple's documentation, 1 font point is equal to 2 pixels.

For example, a 90 pixel font is equal to mytext.fontSize = 90 / 2