Costum font in device

Hi guys,

I’ve imported a font (ttf) via corona and it works fine on the simulator, but when i test on xCode or export
to my ipad the font doesn’t seem to apear :confused:

Can anyone help me with this?

Hi @jorgedesa89

How do you import via corona?

Did you add your font name in your build.settings?

e.g.

iphone = { plist = { UIAppFonts = { "yourfontName.ttf", }, }, }

burhan

Remember the iphone block is inside another table called settings:

settings = {

     iphone = {

             …

     }

}

If your font file name is called fred.ttf,  the font’s internal name might be “fred”.  It might be “FredFlintsone”.  For iOS you need to use the internal name inside your code.  The font has to be in the same directory with your main.lua.

Rob

@BurhanJ

i did but in the iOS simulator it didnt show the font. :confused:

@Rob Miracle

Thanks :smiley:

Hi,

Did you check your font name as Rob mentioned? And also place them in the same directory?

Maybe you can try with other true type font and see if the problem is the same.

Have you check this tutorial on using custom font?

http://coronalabs.com/blog/2013/01/16/faq-wednesday-custom-fonts/

Good Luck!

burhan

Hi @jorgedesa89

How do you import via corona?

Did you add your font name in your build.settings?

e.g.

iphone = { plist = { UIAppFonts = { "yourfontName.ttf", }, }, }

burhan

Remember the iphone block is inside another table called settings:

settings = {

     iphone = {

             …

     }

}

If your font file name is called fred.ttf,  the font’s internal name might be “fred”.  It might be “FredFlintsone”.  For iOS you need to use the internal name inside your code.  The font has to be in the same directory with your main.lua.

Rob

@BurhanJ

i did but in the iOS simulator it didnt show the font. :confused:

@Rob Miracle

Thanks :smiley:

Hi,

Did you check your font name as Rob mentioned? And also place them in the same directory?

Maybe you can try with other true type font and see if the problem is the same.

Have you check this tutorial on using custom font?

http://coronalabs.com/blog/2013/01/16/faq-wednesday-custom-fonts/

Good Luck!

burhan