Modified a font file, text doesn't display at all on device

I have a bunch of fonts in my app that all work fine. I took one font and edited it to make the numbers monospaced and saved it as a new file. I installed it on my Mac and it displays fine on the simulator.

However, when I install the app on my Android device, the text using the custom font doesn’t display at all. Usually when I have an issue with a font, it just reverts to the system default font but at least the text is displayed. I have checked and triple checked that the font name/casing is correct.

Has anyone had this experience with fonts that you modified?

Here’s some more info about my setup:

Corona SDK - 2014.2511

Environment - OSX

Device - Android

You are likely running into an Android font loading bug on Google’s end where it silently fails to load some fonts due to font formatting issues.  Meaning that Mac and Windows font loading software appears to be much more fault tolerant with errors in font files than Android is at the moment.  Other Android and Corona developers solved it by fixing the font file with what’s mentioned here…

   https://forums.coronalabs.com/topic/52830-custom-font-not-working-in-lollipop/?p=275350

   https://code.google.com/p/android-developer-preview/issues/detail?id=608#c16

Thanks Joshua, I’ll give this a try. Although I think it’s odd that they can still their text but I can’t.

The specific bug that I pointed to you up above is on Google’s end.  The issue is that the Android OS loads the font, but silently fails and provides no indication to the native developer that it failed.  Worse… the Android OS indicates that it did successfully load the font when it didn’t.  That’s why it’s not rendering any text.  And that’s why it doesn’t fallback to the default Android OS font.  This is not an issue we can solve in Corona.  You have to *fix* the font file or switch to another font that the Android OS can load.

Yea, I figured it wasn’t an issue with Corona itself. I tried the suggested fix in the link you provided, but that didn’t seem to work for me.

However, I downloaded and installed FontForge and re-did all my customizations. The font shows up on my device now. My guess is there was an issue with some metadata generated by the previous program I used. I’m not very familiar with creating fonts so this was a huge learning experience.

Anyway, thanks for all the help!

You are likely running into an Android font loading bug on Google’s end where it silently fails to load some fonts due to font formatting issues.  Meaning that Mac and Windows font loading software appears to be much more fault tolerant with errors in font files than Android is at the moment.  Other Android and Corona developers solved it by fixing the font file with what’s mentioned here…

   https://forums.coronalabs.com/topic/52830-custom-font-not-working-in-lollipop/?p=275350

   https://code.google.com/p/android-developer-preview/issues/detail?id=608#c16

Thanks Joshua, I’ll give this a try. Although I think it’s odd that they can still their text but I can’t.

The specific bug that I pointed to you up above is on Google’s end.  The issue is that the Android OS loads the font, but silently fails and provides no indication to the native developer that it failed.  Worse… the Android OS indicates that it did successfully load the font when it didn’t.  That’s why it’s not rendering any text.  And that’s why it doesn’t fallback to the default Android OS font.  This is not an issue we can solve in Corona.  You have to *fix* the font file or switch to another font that the Android OS can load.

Yea, I figured it wasn’t an issue with Corona itself. I tried the suggested fix in the link you provided, but that didn’t seem to work for me.

However, I downloaded and installed FontForge and re-did all my customizations. The font shows up on my device now. My guess is there was an issue with some metadata generated by the previous program I used. I’m not very familiar with creating fonts so this was a huge learning experience.

Anyway, thanks for all the help!