Custom Font not loading on build

Hey Guys.

Just wanted to ask a question to see if you know what is going on. I am using a custom font to keep the score in my game, when I test the code it the simulator it works well but when I build and test in the device the numbers disappear. Any idea of what is going on ?

Here is my code:

I placed this on the config .lua

settings =
{
iphone =
{
plist =
{
UIAppFonts =
{
"specialfont.otf"
}
},
},
}

And I placed this on the main.lua

score = 0
scoreText = display.newText( " " .. score,470, 15, "specialfont", 60)

local function countUp()
score = score + 1
scoreText.text = " " .. score

end

tmrscore = timer.performWithDelay(70, countUp, -1)

Thank you for your suggestions.

Have you including the font file in the project folder?

If so ensure you are using the correct font name. (Double clicking it to install it on a Mac will show you the exact name, which should match what you are requiring. If you changed the file name they may not match.)

If this is correct and you are still experiencing issues try with a different font (I always use TTF fonts) to see if it is just an incompatible font or the like.

Lastly - what device are you testing on?

Peach :)

views:1443 update:2011/12/28 9:26:54
corona forums © 2003-2011