Custom Fonts on device

Hi folks!

I have problems about custom fonts and I created this file “fontTest.zip”. I search many tutorials, but I don’t understand what’s wrong on device.

Thanks!

testText = display.newText("Test", 90, 70, "BorisBlackBloxx.ttf", 28) testText:setFillColor(1,1,0)

 plist = { UIAppFonts = { "BorisBlackBloxx.ttf" }

Hi.  You had a couple of mistakes:

build.settings

UIAppFonts = { "BorisBlackBloxx.ttf" } --UIStatusBarHidden=true, UIStatusBarHidden = false,

should be (missing comma after UIAppFonts table):

UIAppFonts = { "BorisBlackBloxx.ttf" }, --UIStatusBarHidden=true, UIStatusBarHidden = false,

main.lua (no need for extension)

testText = display.newText("Test", 90, 70, "BorisBlackBloxx.ttf", 28)

should be:

testText = display.newText("Test", 90, 70, "BorisBlackBloxx", 28)

Thanks roaminggamer!

Works now, I stayed a little confusing.

Are you saying you’re confused by the answers I gave, or generally about using custom fonts?  

Fonts are a little tricky, because the file names won’t necessarily match the name you use when making a text object.

Sometimes iOS loads the font, and it has a different internal name than the file name.  

Just post again if you run into more problems.

-Ed

I was confusing about using custom fonts, but now, I understand.

Thanks again!

Hi.  You had a couple of mistakes:

build.settings

UIAppFonts = { "BorisBlackBloxx.ttf" } --UIStatusBarHidden=true, UIStatusBarHidden = false,

should be (missing comma after UIAppFonts table):

UIAppFonts = { "BorisBlackBloxx.ttf" }, --UIStatusBarHidden=true, UIStatusBarHidden = false,

main.lua (no need for extension)

testText = display.newText("Test", 90, 70, "BorisBlackBloxx.ttf", 28)

should be:

testText = display.newText("Test", 90, 70, "BorisBlackBloxx", 28)

Thanks roaminggamer!

Works now, I stayed a little confusing.

Are you saying you’re confused by the answers I gave, or generally about using custom fonts?  

Fonts are a little tricky, because the file names won’t necessarily match the name you use when making a text object.

Sometimes iOS loads the font, and it has a different internal name than the file name.  

Just post again if you run into more problems.

-Ed

I was confusing about using custom fonts, but now, I understand.

Thanks again!