Bundling a TTF in my app

I’m trying to get a True Type Font (TTF) to work in my app.

“Action Man.ttf”

The documentation online says make sure its in the resource directory. So it is, as long as the resource directory is the root of the app build folder.

I managed to make the font work in the simulator by installing to my Windows OS, but once I build the .apk there is no font on the device.

I have tried removing spaces, and making the filename all lower case to no avail. According to the info online this should be working … 

What is the correct way to include a font in an app? 

I’m not quite sure why it’s not working but I did write a bitmap font library (it’s free) and you can convert your TTF to a bitmap font and that will work. https://github.com/autismuk/Font-Manager

I think they have to be added to build.settings for iOS, but not for Android. The other things to consider doing are checking cases, which sometimes work differently, and also the space in the filename.

To add to what Paul said, sometimes TTFs don’t work with Corona, for whatever reason. I’d suggest trying a control case with the below font, which I know works. I can tell you from experience, TTFs that have titles that are multiple words seem to be the most finicky.

http://openfontlibrary.org/en/font/xolonium

The internal font name must match the file name, I’ve found.   I would find out what the internal name is and then rename the file to match.

Rob

I’m not quite sure why it’s not working but I did write a bitmap font library (it’s free) and you can convert your TTF to a bitmap font and that will work. https://github.com/autismuk/Font-Manager

I think they have to be added to build.settings for iOS, but not for Android. The other things to consider doing are checking cases, which sometimes work differently, and also the space in the filename.

To add to what Paul said, sometimes TTFs don’t work with Corona, for whatever reason. I’d suggest trying a control case with the below font, which I know works. I can tell you from experience, TTFs that have titles that are multiple words seem to be the most finicky.

http://openfontlibrary.org/en/font/xolonium

The internal font name must match the file name, I’ve found.   I would find out what the internal name is and then rename the file to match.

Rob