I’ve done a bit more testing of the new display.newText in build 773, including looking at the contentWidth calculation using the following code:
x, y = 50, 50
txt = display.newText("test", x, y, 60, 0 )
rect = display.newRect( x, y, txt.contentWidth, txt.contentHeight )
rect:setFillColor( 111, 0, 0 )
rect:toBack()
On 3GS and 4S devices and simulator, the text is stretched out (as I mentioned in the previous post). I unfortunately don’t have a new iPad to test this on so if someone could test this and add to the thread, that would be helpful.
For Android, on the simulator, the text appears stretched. On an Android 3.1 tablet, the text appears fine, but I think that the red background box should have the width of the text instead of the max width of 60.
I see that there have been quite a few other posts recently about issues with newText, so I hope Ansca can issue a fix soon! It would be great to have just one text function for all device types.
@yogamatta, from Carlos’ post to this thread on Tuesday, I’m not sure if I’m supposed to submit a separate bug request. Carlos, please let me know and I’ll submit one.
[import]uid: 29384 topic_id: 23417 reply_id: 96085[/import]