"Native Typeface Cannot Be Made" Only for Some People

Issue when using a custom font - native typeface cannot be made

The font file is either corrupt or unsupported for some reason. You can drop it on the SD card and load it from file, to make sure it's not a problem with your assets.

RuntimeException: native typeface cannot be made when loading font

Android does not support OpenType (OTF), only TrueType (TTF), so your Molot.otf font probably will not work. I wrote both of those blog posts you link to in your opening sentence (the one is a pirated copy of the other), and they do not use Molot.otf.

(BTW, I somewhat repaired the formatting of that post -- AndroidGuys keeps changing WordPress hosts, and so my older posts are terribly broken in terms of formatting).

EDIT: As stated in the comments, Android DOES now support OTF.

Android - Native typeface cannot be made for TTX font

The recommendation on the issue at code.google.com says that you should make your font go through a roundtrip though ttx tools.
What that meant was you can do the following.

  1. Convert your ttf font file to ttx file using the ttx tool.

    ttx -o somefont.ttx somefont.ttf

  2. Convert the ttx file created in step one to a ttf file, again using the ttx tool.

    ttx -o somefont_converted.ttf somefont.ttx

Using this process. I was able to successfully make my font available nexus 5 running the factory lollipop image.



Related Topics



Leave a reply



Submit