How can I determine the "maximum texture height" for a given device?

Yup, this could work. Add one word at a time and watch the height, and as soon as it increases back off one word and you have the end of line. Good logic but I’m worried about the complexity of this code and the performance of course. It would be so good to have some improvements to the display.newText() to support this discussion which brings us to your recommendations below…

I agree these are all great suggestions. Need to put the chosen font & font size into the mix as well as these affect overall the text height. Lets hope Corona Labs will be able to improve display.newText() eventually. 

Thanks for the wonderful work!

I have tested this, and it works nicely except on iOS (works find on Android). I drill it down to the string.sub portion, where the ‘\n’ needs to be remove. If not, a new line is always inserted at the end and creates an ‘unwanted new line’.

See the updated code that I am using now. Changes ONLY to the string.sub line, where from ‘b-1’ to ‘b-2’

~ removed ~ See following post.

Are you sure your text has a \r in it?

Sorry, my bad. I have removed my code above to avoid confusion. Thanks

Thanks for the wonderful work!

I have tested this, and it works nicely except on iOS (works find on Android). I drill it down to the string.sub portion, where the ‘\n’ needs to be remove. If not, a new line is always inserted at the end and creates an ‘unwanted new line’.

See the updated code that I am using now. Changes ONLY to the string.sub line, where from ‘b-1’ to ‘b-2’

~ removed ~ See following post.

Are you sure your text has a \r in it?

Sorry, my bad. I have removed my code above to avoid confusion. Thanks