Help Installing Custom Fonts

I’d suggest simply using this to call your font: 

local fontStyle = "Krabby Patty"

If it doesn’t find your font it will default to the system.nativeFont, so no need to do that in code. Could you post your build.settings file?

I ran a test with the Krabby Patty font and I can confirm that it does not work on Android.  Unfortunately there is no way to make it work as some fonts are just not supported.

thanks for the reply develephant,

Aw, then that answer’s my problem then,

too bad, I like how Krabby Patty looks though

Gimme font file and I will check it on Android in few hours

Sorry piotrz for the reply, I’ve been doing many school works lately.

I got the font style from here,

http://www.dafont.com/krabby-patty.font

If it doesn’t bother you can download it from there.

Thanks in advance,

Jam

Worked out of the box for me. Both pc and Android

Just main.lua

local krabbyText = display.newText( "My new text in 'Krabby Patty' font", 25, 100, "Krabby Patty", 40 )

and “Krabby Patty.ttf” in project folder

@piotr, I received an error in my tests as well. Can you provide your build.settings file and the code you used to call it? I’m intrigued as to how you got it to work!

No other files, just main.lua and font file. Code is in post above.

Fascinating… so it’s just this line:

local krabbyText = display.newText( "My new text in 'Krabby Patty' font", 25, 100, "Krabby Patty", 40 )

Which Corona build are you using?

2013.1202

Check if this apk works for you

http://www.sendspace.com/file/z5pny0

it doesn’t work for me… or is it the device itself has the problem? I’m using samsung galaxy tab 2 7.0 as a testing device…

Can you post the source code piotrz55?

As I said: just main.lua with this one line and ttf file with font.
Checked on galaxy s3.

I have a same kind of issue with fonts on Android.

I have a .ttf file that i implement in my newText. If i run the app then in the simulator i can’t see the font change but if i compile it and run it on my Android phone then it is the font that i want.

Maybe you can try to run it on your device, then i should work.

I think this issue has something to do with older laptops i think. I have a laptop from 2007 and before i could run the app in the simulator i had to update my openglide version because i didn’t see images and buttons. I udated to the latest video drivers and that fixed this issue. Maybe this can help you.

Anyway, good luck with building an app. I started now 2 months ago with corona and it is a great platform and the coding is easy.

I noticed also the following issue on my system and that is that some fonts are working fine in the simulator and others don’t. Both are .ttf files. That is something strange.

@joerijacobs before the simulator can use custom fonts, they have to be installed in the operating system. The simulator does not pick them up out of folder like the devices do.  This is a limitation of Windows and OS-X.  Just double click on the font to install it, then restart Corona SDK and you should see your fonts in the simulator.