Embedding Fonts on Android

As per the documentation, I am just dropping the fonts in the same directory as all my other assests. The fonts embed fine for the iPhone(with the pList entry) but I cannot get them show up in the native.getFontNames() array on an Android build, so that I can get the correct font name.

Here is the code I am using to view all the available fonts on the Android (I am using a Samsung Galaxay Tab). All I get is a bunch of Droid fonts and Verdana and Comic Sans. I’ve tried both ttf and otf fonts and neither one seems to embed. Is there something else I am missing in order to get the font to show up in the native.getFontNames() array?

local i local fn = native.getFontNames() local line = 0 for i=1, #fn, 1 do line = line + 1 local typestuff = display.newText(fn[i], 5, 5 + (line\*15), fn[i], 15) typestuff:setTextColor(217,212,128) localGroup:insert(typestuff) print(fn[i]) end

Thanks!

ketih [import]uid: 29520 topic_id: 12319 reply_id: 312319[/import]

Dang it… never mind. Anyone else having issues, go here…

http://developer.anscamobile.com/forum/2011/02/28/custom-fonts-android

you probably need to edit the font name to something simpler. I used http://www.cr8software.net/typelight.html to edit the font name and it worked like a charm.

[import]uid: 29520 topic_id: 12319 reply_id: 44849[/import]