Bugfix: text resized too small

Don't adjust textSize until getMeasureWidth() returns something larger than 0, otherwise, the textSize will be changed (to a value smaller than necessary), before being set to the correct value.