font size for devices with different amount of pixels available

Hello!
I have a small box I have the user entering data into, but depending on the device I use the simulator on, the text size is either too small or too large. So what I did is make the text size ratio of the display.contentHeight of the device in use. This works well on most devices except for the iphone. What I’m having trouble with is making an argument as to if the display.contentHeight is less than 800 lets say, then I’ll make a new ratio specifically for that device.

Is a local function different than a regular function? I tried to make a regular function to act without being called on but I had no luck in it working (simulator works and terminal says there’s no problem with coding).

So this is what I have. The plan is to have this near the beginning of the code and then set all the textbox’s text size to the value my adjustedText comes out to be.

[lua] function textSize()
if (display.contentHeight < 850) then
local name9 = display.newImage (“newNamePlaque2.png”, 300, 300)
adjustedText = display.contentHeight/20

elseif (display.contentHeight > 850) then
adjustedText = display.contentHeight/10
end
end [/lua]

Any help is appreciated! [import]uid: 35535 topic_id: 30253 reply_id: 330253[/import]