Timmy
Timmy

Reputation: 12858

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.

Upvotes: 0

Views: 914

Answers (1)

dragoneye
dragoneye

Reputation: 701

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

Upvotes: 4

Related Questions