Text being cut off

I have a text of around 94 letters, but the object is being cut off at a certain width roughly at 80%*. I don’t use any of the optional width or height parameters so display.newText() autosizes, but apparently there’s an issue here. This happens both with a custom font, as well as with native.systemFont or native.systemFontBold, and it happens at different font sizes too.

Thanks for any help and pointers!

*Project details: Corona Build 772, a Universal letterbox project scaled at iPhone 3 default portrait resolution, seen in the Win Simulator iPhone 4. [import]uid: 10284 topic_id: 23976 reply_id: 323976[/import]

Daily Build 774 addresses a bunch of bug reports around text display. You might want to download it and see if it makes your life better. I’m installing it now and I’ll see very soon if it fixed all of my problem text issues.
[import]uid: 19626 topic_id: 23976 reply_id: 96566[/import]

Thanks a lot, will try and report results back here in a moment!

Thanks for all your replies, helps a lot! [import]uid: 10284 topic_id: 23976 reply_id: 96568[/import]

Bug still happens in Build 774 unfortunately (other font sizing issues remain too). [import]uid: 10284 topic_id: 23976 reply_id: 96570[/import]

Can you post some code for us to see? [import]uid: 19626 topic_id: 23976 reply_id: 96617[/import]

There are still font scaling issues with the latest build when doing a Universal app, so this bug may be caused by the other font bugs. Here’s an example of the text being cut off – you need the specific universal configuration and look at it using the Windows Simulator with iPhone 4… I’ve included to see the issue:

http://versuspad.com/text-issue.zip

[code]g_text = nil

function main()
if g_text == nil then
local s = ‘Hello world 1 Hello world 2 Hello world 3 Hello world 4 Hello world 5 Hello world 6 Hello world 7 Hello world 8 end.’
– text is cut off somewhere
g_text = display.newText(s, 200, 200, native.systemFontBold, 25)
else
g_text.x = g_text.x - 10
end
end

Runtime:addEventListener(‘enterFrame’, main)[/code]

I’m now going to load this on my phone to see if the bug persists on the actual device. [import]uid: 10284 topic_id: 23976 reply_id: 96627[/import]

Ugh, on the actual iOS device my app fares even worse: the text background is fully white (making the text unreadable). On Win Simulator, it’s only the cut off issue, but still readable… [import]uid: 10284 topic_id: 23976 reply_id: 96632[/import]

On the Mac simulator I’m getting the solid white background.

The problem appears that if the text is too long for “something”, it appears to mess with making the background color the same as the foreground color. With your “Hello world 1” string, that was at 90 characters (952 pixels with Helvetica as the font). With my string, it happened at 91 (956 pixels with Helvetica as the font). Since our strings widths are going to be variable based on the letters we used, something around that point.

Since I can’t see any longer text, I’m not sure what’s being cut off. Is it cutting off by any chance at “Hello world 6 Hell” on the window’s simulator? This is the point where the color problem shows up.

If it’s okay with you, I’m gong to use this to create a bug report. [import]uid: 19626 topic_id: 23976 reply_id: 96639[/import]

Bug filed #13200 [import]uid: 19626 topic_id: 23976 reply_id: 96643[/import]

Cutting off at “Hello world 6 Hello worl” here (I suppose it might be using another font as replacement for Helvetica.)

Thanks for filing the bug report! I might need to wait for a fix before continuing with my current project, as I scroll a lot of text this way. I could probably split the string up and try to guess at which width I’d need to put the subsequent string part objects, but this might be messy and seems to invite device/scaling-specific display flaws… [import]uid: 10284 topic_id: 23976 reply_id: 96644[/import]

Thanks for posting bug # - will bring this up in our next meeting. [import]uid: 52491 topic_id: 23976 reply_id: 96811[/import]

+1 I’m having essentially the same issue. [import]uid: 87249 topic_id: 23976 reply_id: 96998[/import]

Was this ever fixed, I’m having same issue. [import]uid: 9046 topic_id: 23976 reply_id: 99531[/import]

I believe it’s still being worked on but is high priority - need to double check that. (Build notes mention fixes.) [import]uid: 52491 topic_id: 23976 reply_id: 99712[/import]

Excellent, thanks Peach, please do let us know! [import]uid: 10284 topic_id: 23976 reply_id: 99737[/import]

Thanks Peach. For now the only thing I can do in our latest app is use monospaced fonts which seem to work okay.

[import]uid: 9046 topic_id: 23976 reply_id: 99855[/import]