Huge Corona Simulator Text Positioning Bug 705/706

I just moved up from build 689 to 705 (and I tried 706) and now all text is positioned in the wrong place inside the Corona Simulator and iOS Simulator, making it difficult to ensure my positioning is correct.

However, if I build for the device and run an app, the positioning is correct. So the problem is just in the simulator. I have no idea what the root cause may be…

Two images below, using the EXACT same code. The top is in the Corona Simulator, the bottom on the Device. I’ve circled the issue in red on both images.

[import]uid: 36054 topic_id: 19133 reply_id: 319133[/import]

I can second that. The windows simulator is working fine though. [import]uid: 90610 topic_id: 19133 reply_id: 73751[/import]

I’ve been able to pinpoint the issue as affecting newRetinaText only. newText still works correctly in the simulator. [import]uid: 36054 topic_id: 19133 reply_id: 73756[/import]

OOOOOps !

we will look into it asap

c [import]uid: 24 topic_id: 19133 reply_id: 73784[/import]

We’ve got the issue fixed, just waiting for it to be pushed into the daily builds :slight_smile:

You’ll see it in the release notes when it becomes available.

As a quick heads up:

When the fix comes out, you won’t be able to change text with the .text property with text created using display.newRetinaText. Instead, to change text you’ll use text:setText().

Remember, that will only be for text created using display.newRetinaText and display.newEmbossedText. display.newText will remain in-tact. [import]uid: 52430 topic_id: 19133 reply_id: 73879[/import]

Thanks for getting the bug so quickly. From my experience the .text property has never been usable with newRetinaText or newEmbossedText. I’ve always had to use setText. [import]uid: 36054 topic_id: 19133 reply_id: 73884[/import]

thanks for the fast fix! [import]uid: 90610 topic_id: 19133 reply_id: 73891[/import]

Sorry to bring this up again, but I did not see the fix in 707, do you guys have any idea when we’ll see it? [import]uid: 36054 topic_id: 19133 reply_id: 74084[/import]

747 , 777, 787, you pick.

:slight_smile:

hmmmmm don’t think it made the 707 cut.

c. [import]uid: 24 topic_id: 19133 reply_id: 74085[/import]

We’ve decided that this is something that we need to implement natively (rather than scaling text to look sharp on high resolution displays), but we understand that you may not want to wait for that to happen.

Therefore, I’m going to write a blog post soon that will “open source” the fixed display.newRetinaText() function. For those who don’t want to wait for the blog post, here’s the function you can use IN-PLACE of display.newRetinaText.

https://gist.github.com/1484118

UPDATE: With the function above, there have been issues that cause it not to work properly in the simulator when using content scaling + galaxy tab/kindle fire/nook skins and retina text with those skins. So if you’re developing apps and need to use those skins with the newRetinaText() function, I recommend reverting to dispaly.newText when using the simulator.

Here’s some code you could put at the top of main.lua:

local myText = textFunc( "This is text", 0, 0, 300, 200, "Helvetica", 18 )[/code] [import]uid: 52430 topic_id: 19133 reply_id: 74087[/import]

Regarding retina text:

display.newText() has been modified to handle “retina text” automatically, and therefore display.newRetinaText() has been deprecated since it is no longer needed.

The changes will be reflected in the next daily build (the one posted *after* 2012.770).
[import]uid: 52430 topic_id: 19133 reply_id: 94934[/import]