I must be missing something, but I can’t understand why there’s a distinction between regular text and hi-res “retina” text. IMHO text should always be displayed in the highest possible resolution on the device, and thus only one newText() function would be necessary.
What I’m using now to solve this issue is the following function, which is working well on all devices I’ve tested it on. It should also be future-proof whenever the iPad comes out with a high-res display as well.
[lua]Module.newText = function(str, xPos, yPos, font, size)
local scaleY = display.contentScaleY;
local scaleFactor = 1.0;
if (scaleY < 1.0) then
scaleFactor = 1 / scaleY;
end
local text = display.newText(str, 0, 0, font, size * scaleFactor);
text.xScale = scaleY;
text.yScale = scaleY;
text.x = xPos;
text.y = yPos;
return text;
end[/lua]
BTW: The current retina-text functions in Corona don’t display hi-res text on an iPad.
[import]uid: 70847 topic_id: 18314 reply_id: 318314[/import]