Hello,
I am relatively new to Corona but am struggling with text alignment. I have an image of a sun and letters Aa to Zz on it:
letterText = display.newText( uppercasesunLetter .. composer.selectedLetter, 0, 0, "Comic Sans MS", 50) letterText.align = center letterText:setFillColor( 0, 0, 0 ) letterText.y = Sun1.y letterText.x = Sun1.x
To center on the y axis I have done:
letterText.y = Sun1.y-5
This was through trial and error and works for 50 font size. Thankfully, all the letters have the same height because of the capital.
For the x axis, I have no idea how to center it. WIth Aa -2 works works. For other letters it does not.
One solution, of course, would be to do a large table with the adjustments to be made for each letter. However, ideally I’d like to be able to resize to sun relative to the resolution of the screen.
Have others found this issue? Is it a limitation of Corona? Should I make the letter text into graphics and simply load them in?
Thank you.