Skip to main content
July 29, 2010
Question

Resizing TextLine

  • July 29, 2010
  • 1 reply
  • 611 views

Hi All,

My question is more about the Text Engine.

I am writing a TextField class, which can have only one line of text and its width has a maximum value. If the the width of the textline is higher than the width of the textfield, then the textline has to be resized. I want to keep the best quality of the letters.

There are two ways of resizing a textline:

1. resizing the sprite where the textLine is staying like container.width or resizing the textline.width

2. decrease the fontSize and regenerate the textLine.

I am looking for the best quality. Which one should I have to follow? Decreasing the fontSize or changing the width?

I also noticed, that the fontSize is a Number value and I can decrease that like by using fontSize -= 0.25.

I think the second option is better. Any suggestions?

Thanks!

This topic has been closed for replies.

1 reply

Inspiring
July 29, 2010

I think the second option is better, thats the way I usually handle autosized text.