I was trying to use display.newText() to display text with a custom font and in the simulator it was all right but when I intalled my app on an iPad it displayed only the higher half of the word. So I tried to install it even on a tablet with Android and it worked all fine. After that I tried to change font using another font and it worked fine even on the iPad! So I would ask you, what I should do? Is there any “trick” to bipass this issue?
This is the code that calls the display.newText() :
local text = display.newText("Hello", 70, 330, "myfont", 32)
Thank you,
Andrea [import]uid: 63063 topic_id: 35752 reply_id: 335752[/import]
If its only happening with that one font, perhaps iOS is having trouble rendering that font. OS-X, iOS, Android and Windows will all render fonts differently. I would try finding a different font, or perhaps, use the additional parameters to display.newText() that lets you set the width of the box and the height (for wrapping text) and maybe try to make the box double the font size. In other words try:
local text = display.newText("Hello", 70, 330, 200, 64, "myfont", 32)
[import]uid: 199310 topic_id: 35752 reply_id: 142236[/import]
If its only happening with that one font, perhaps iOS is having trouble rendering that font. OS-X, iOS, Android and Windows will all render fonts differently. I would try finding a different font, or perhaps, use the additional parameters to display.newText() that lets you set the width of the box and the height (for wrapping text) and maybe try to make the box double the font size. In other words try:
local text = display.newText("Hello", 70, 330, 200, 64, "myfont", 32)
[import]uid: 199310 topic_id: 35752 reply_id: 142236[/import]