First of all, custom fonts don’t seem to work as claimed. I got a copy of DroidSansMono.ttf, which works on Windows development if I do this in build.settings:
iphone = { plist = { UIAppFonts = { "DroidSansMono.ttf" }, }
But to make it work on iOS or Mac development, I have to rename it to “Droid Sans Mono.ttf” then do like this in build.settings:
iphone = { plist = { UIAppFonts = { "Droid Sans Mono.ttf" }, }
But now when I go back to Windows development, I get “Warning: could not load font Droid Sans Mono…”
My question is, is there an error code that I can key off of to prevent having so many warnings in the console? I have text updates of parameters many times a second, and every one of them gives a warning because “Droid Sans Mono” isn’t loading. If I could get an error code, then I could use a different font name and avoid the warning.
I don’t really understand why there have to be four ways to load a font. I mean, this is software guys, we can abstract things. I thought that was the whole idea behind Corona SDK.
edit: GAH! Nevermind, I forgot I was developing on a new Windows machine and hadn’t installed the font yet.