There really isn’t such a list.
Android only has Droid Sans, Droid Sans Mono and whatever their Droid Serif font. That’s the total list.
For iOS there are probably 100 fonts available. For Kindle Fire, they include the Microsoft public fonts like Arial, New Times Roman and Courier which are also on iOS. The Nook has a smaller set of fonts, but some of the common Microsoft fonts are not among them.
Georgia, a nice Serif font is common to everything but Android with one catch. The font name on iOS and the Nook is “Georgia”, on the Kindle Fire, its “georgia” and the case is enough that you have to code like you’re using a different font.
You can build this little app and install it on the device you want and it will dump the fonts for you:
local v = {}
v[1] = display.newText(system.getInfo("name"),0,0, "Helvetica", 18)
v[2] = display.newText(system.getInfo("model"),0,0, "Helvetica", 18)
v[3] = display.newText(system.getInfo("platformName"),0,0, "Helvetica", 18)
v[4] = display.newText(system.getInfo("platformVersion"),0,0, "Helvetica", 18)
v[5] = display.newText(system.getInfo("build"),0,0, "Helvetica", 18)
v[6] = display.newText(system.getPreference("ui", "language"),0,0, "Helvetica", 18)
for i = 1, #v do
v[i]:setReferencePoint(display.TopLeftReferencePoint)
v[i].y = i \* 20
v[i].x = 10
end
local fonts = native.getFontNames()
local fontStr = {}
local i = 1
local col = 1
local row = 1
for k, v in pairs(fonts) do
-- print(k,v)
fontStr[i] = display.newText(v .. " ??? ?????",0,0,v,14)
fontStr[i]:setReferencePoint(display.TopLeftReferencePoint)
fontStr[i].y = row \* 18 + 128
fontStr[i].x = 10 + (col - 1) \* 290
col = col + 1
if col \> 2 then
col = 1
row = row + 1
end
i = i + 1
end
Just be aware when loading it into the simulator it will try to build a list of all the fonts on your Mac or PC and it’s REALLY SLOW… Must faster on the device since there are fewer fonts.
[import]uid: 19626 topic_id: 31018 reply_id: 124047[/import]