Timmy Timmy - 1 year ago 212
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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download