How to Display multiple lines of text without separate display.newText calls?

How do I display multiple lines of text without displaying each line separately with display.newText commands

Is there a text wrap function? e.g. provide x,y coords for a box that text wraps into OR

Is there a new line character? that splits the lines

I have Text Candy which I’m using for large bit map fonts, but for small vector fonts the lack of proper kerning (intelligent spacing that changes the space between each character depending on its shape) it looks pretty bad compared to the display.newText command.

Oh yes I’ve tried searching the forums but you just go around in circles chasing comments made in 2009… tried searching text wrapping, multiple lines etc.

the API documents has just 3 calls for display.newText text and a few lines of code as examples.

Please help!!!

[import]uid: 3093 topic_id: 13603 reply_id: 313603[/import]

You have 3 options and none of them are ideal for various reasons.

  1. there is a autowrap text module posted in the community contributed code. It works pretty well, but it’s not perfect.

  2. Use a webpopup. You can write the text out to a file in your system.TemporaryDirectory and then load it in with a webpopup. I’m considering this for my RSS reader since the content can contain markup. It only works on device or the Xcode simulator, so you can’t see what your doing in Corona SDK’s simulator. Its not a display object, so it can’t be in groups and you have to have code to dismiss the block. But with careful positioning, it will work.

  3. Use the native.newTextBox() api call. Again, not visible in the Corona SDK, doesn’t do any HTML formatting, but works pretty darn well otherwise. This is what I will probably end up with in my RSS reader. [import]uid: 19626 topic_id: 13603 reply_id: 49927[/import]

thanks for feedback and ideas, so really for me its a no… but as I couldn’t find a mention before hopefully this post will steer others in the directions you mention

I’m in the process of setting up mutliple display objects, one for each line and changing their settings and text strings as needed…

it’s just dawned on me I should have just asked mt friendly artist to create bitmaps in Photoshop, would have been quicker and looked better in the end… [import]uid: 3093 topic_id: 13603 reply_id: 49956[/import]