I find it easier to use the system font with a little twist
function newFont( params )
local isAndroid = “Android” == system.getInfo(“platformName”)
if isAndroid and params.android then
font = params.android – return font for Android
elseif params.ios then
font = params.ios – return font for iOS/MacOS
else
font = native.systemFont – default font (Helvetica on iOS, Android Sans on Android)
end
return font
end
It makes it easier for the user to accepct the app as part of the device but if you want custom fonts you have to include the font file in an include folder in the application folder. and add the following to your build.settings file
UIAppFonts = { “EXACT_FONT_NAME.ttf” }
then you reference it in your application as a *function itself either in the ui.lua file or in the main.lua file.
*(There is a new blog up about functions as of 2-28-12 by Jonathan Beebe (CoronaSDK - DemiGod))
i.e.:
–Code for main.lua or ui.lua file–
local fontName = “font_name”
–Indicate the size to ensure it fits the space it will display–
local fontSize = 26 [import]uid: 104728 topic_id: 22591 reply_id: 90063[/import]