text adjustment

Hey folks,

I know this is an old topic but I still didn’t come across any solution or fix that could help me out.

I am working on a professional product for a big company. I am almost finished with it but the adjustment of the text gives me a headache. I just don’t know what to do.

Although I fell in love with the corona sdk it really bugs me and even makes me angry that after all these years the team didn’t even seem to think about fixing the issue with the width or setreferencepoint for the newtext fields. I really appreciate their work, I know it’s a relatively small team but still … this is important as many many people have complained about this!

I tried everything from changin the order of manipulating text-objects to changing my custom font ( Bebas Neue ) to native system fonts. Without success…

I’m drawing my lists like that:

  
local texte4 = display.newText( data.getObj("xx").extra[i].val,0, 0, "BebasNeue", rfontsize)  
texte4:setReferencePoint(display.CenterRightReferencePoint)  
texte4.x = display.contentWidth - 20  
texte4.y = txty + 16  
  

and it looks like this (absolutely intolerable) on my device:

http://s45i.img-up.net/smbugb011.png

any help highly appreciated
[import]uid: 140000 topic_id: 34071 reply_id: 334071[/import]

Hello Roman,
I understand your frustration (having wrestled with it myself on many occasions), but the issue certainly has been investigated by the engineering team on several occasions (including another small fix rolled out into a Daily Build just last week). The issue, sadly, is that there’s “not much to fix”… it’s a text padding issue on devices, and it varies slightly from OS to OS (which OS are you running this on, might I ask?). How text looks on iOS might vary from Android, and given the countless “versions” of Android, it might even vary among different Android devices.

Unfortunately, I can only suggest that you try a mono-spaced font at this point, like Andale Mono or something. At least this should put the fonts in proper alignment amongst each line.

Hope this helps somewhat, and yes, if there was more that could be done I’d be pushing for it to happen, but in many ways it’s just the way things are. :frowning:

Brent
[import]uid: 200026 topic_id: 34071 reply_id: 135464[/import]

Hey Brent,

Thank you for very much your quick reply.
I tried installing the latest build but for some reason it ruins the whole app (stuff doesn’t work anymore). it’s the first daily build that does something this terrible…

so I rolled back to the daily build I was working on before and tried out a monospaced font. without success…

I’m currently testing my app on iOS 5.1.1 on an iPad 1st Generation. I already tried it on other devices like iPhone5 as well. can’t remember if I had the same issues there, but as soon as I have it here I’ll give it a new try.

in the meantime I’ll try to fix it manually by the string-length maybe I’ll find a way with that… [import]uid: 140000 topic_id: 34071 reply_id: 135469[/import]

Hi Roman,
Can you send me your current code, just the part where you put the text on screen?

What errors did you receive in the Terminal when you tried the latest Daily Build? And which “core” build did you roll back to? #971?

I’ll tinker with this font thing a bit later today, maybe I can figure out something…

Brent
[import]uid: 200026 topic_id: 34071 reply_id: 135472[/import]

Hey Brent,

I don’t think I got any error messages, but I noticed the following bug:

I have a lot of different scenes ( storyboard ), through which I can navigate via left and right swipe. I’m using the new willEnterScene and didExitScene features a lot. I also manually purge and remove the scenes in didExitScene ( after one has swiped )

it seems that the new daily build messes up the timing of these events, because now the scenes are removed when the next scene comes in. It should be removed AFTER the next scene came in.

So I better stick with the old daily build. But you should probably take a look into it.

Thank you a lot for your offer. I’ll eventually do that. Now I just manually fix it by finding out the length of the strings and adjusting the x position afterwards. It’s not 100% perfect but a start…

talk later,
roman
[import]uid: 140000 topic_id: 34071 reply_id: 135616[/import]

Hi Roman,
Just to confirm, you narrowed this down to a Storyboard issue more than a text alignment/refpoint issue? If you simply place your text objects in a static scene (minus Storyboard) is the alignment better? I see the threads about Storyboard and I’m checking into it now… thanks for your update on this; hopefully you can work with the latest official Build 971 until this is resolved.

Brent [import]uid: 200026 topic_id: 34071 reply_id: 135627[/import]

Hello Roman,
I understand your frustration (having wrestled with it myself on many occasions), but the issue certainly has been investigated by the engineering team on several occasions (including another small fix rolled out into a Daily Build just last week). The issue, sadly, is that there’s “not much to fix”… it’s a text padding issue on devices, and it varies slightly from OS to OS (which OS are you running this on, might I ask?). How text looks on iOS might vary from Android, and given the countless “versions” of Android, it might even vary among different Android devices.

Unfortunately, I can only suggest that you try a mono-spaced font at this point, like Andale Mono or something. At least this should put the fonts in proper alignment amongst each line.

Hope this helps somewhat, and yes, if there was more that could be done I’d be pushing for it to happen, but in many ways it’s just the way things are. :frowning:

Brent
[import]uid: 200026 topic_id: 34071 reply_id: 135464[/import]

Hey Brent,

Thank you for very much your quick reply.
I tried installing the latest build but for some reason it ruins the whole app (stuff doesn’t work anymore). it’s the first daily build that does something this terrible…

so I rolled back to the daily build I was working on before and tried out a monospaced font. without success…

I’m currently testing my app on iOS 5.1.1 on an iPad 1st Generation. I already tried it on other devices like iPhone5 as well. can’t remember if I had the same issues there, but as soon as I have it here I’ll give it a new try.

in the meantime I’ll try to fix it manually by the string-length maybe I’ll find a way with that… [import]uid: 140000 topic_id: 34071 reply_id: 135469[/import]

Hi Roman,
Can you send me your current code, just the part where you put the text on screen?

What errors did you receive in the Terminal when you tried the latest Daily Build? And which “core” build did you roll back to? #971?

I’ll tinker with this font thing a bit later today, maybe I can figure out something…

Brent
[import]uid: 200026 topic_id: 34071 reply_id: 135472[/import]

Hey Brent,

I don’t think I got any error messages, but I noticed the following bug:

I have a lot of different scenes ( storyboard ), through which I can navigate via left and right swipe. I’m using the new willEnterScene and didExitScene features a lot. I also manually purge and remove the scenes in didExitScene ( after one has swiped )

it seems that the new daily build messes up the timing of these events, because now the scenes are removed when the next scene comes in. It should be removed AFTER the next scene came in.

So I better stick with the old daily build. But you should probably take a look into it.

Thank you a lot for your offer. I’ll eventually do that. Now I just manually fix it by finding out the length of the strings and adjusting the x position afterwards. It’s not 100% perfect but a start…

talk later,
roman
[import]uid: 140000 topic_id: 34071 reply_id: 135616[/import]

Hi Roman,
Just to confirm, you narrowed this down to a Storyboard issue more than a text alignment/refpoint issue? If you simply place your text objects in a static scene (minus Storyboard) is the alignment better? I see the threads about Storyboard and I’m checking into it now… thanks for your update on this; hopefully you can work with the latest official Build 971 until this is resolved.

Brent [import]uid: 200026 topic_id: 34071 reply_id: 135627[/import]

Hey Brent

I’m sorry for the late reply. No - I just wanted to tell you what the latest build did to my project overall. I didn’t mean to say that this has anything to do with my text-alignment problem.

Thanks.
Merry xmas
Roman [import]uid: 140000 topic_id: 34071 reply_id: 136291[/import]

Hey Brent

I’m sorry for the late reply. No - I just wanted to tell you what the latest build did to my project overall. I didn’t mean to say that this has anything to do with my text-alignment problem.

Thanks.
Merry xmas
Roman [import]uid: 140000 topic_id: 34071 reply_id: 136291[/import]