Text Cutoff

I’m using a custom font and the top gets cutoff.  In the screenshot you can see the numbers and the top 3-4 pixels of each number is just cutoff.  It looks fine in the simulator, but on the device or Xcode simulator it is cutoff.  Here is the code I’m using:

local scoreTxtOptions =         {             text = "1234567890",                  x = 0,             y = 0,             width = screenWidth-40,             height = 320,             font = fonts["MenschInline"],                fontSize = 80,             align = "center"               }         scoreTxt = display.newText( scoreTxtOptions )               scoreTxt:setTextColor(239,170,85)         scoreTxt.x = screenMiddleX         scoreTxt.y = scoreTxt.height/2+12         scrollView:insert(scoreTxt)              

I’ve tried messing with the height and y coordinates and nothing helps.

Set height to 0 (Corona will set proper height itself then)

Thanks for the reply.  I’ve tried that and the text wraps correctly, but the top of the first row is still cutoff.

So I’ve come up with a temporary workaround of adding a \n as my first line.  The text now doesn’t get cut off, I just have to adjust the y coords to get it where i want.  It works, but sure doesn’t seem like the most optimal solution.

Set height to 0 (Corona will set proper height itself then)

Thanks for the reply.  I’ve tried that and the text wraps correctly, but the top of the first row is still cutoff.

So I’ve come up with a temporary workaround of adding a \n as my first line.  The text now doesn’t get cut off, I just have to adjust the y coords to get it where i want.  It works, but sure doesn’t seem like the most optimal solution.