Running into a weird problem for iOS. Font is showing up in the emulator (Corona Emulator), but not in actual ipa build. Following steps have been done:
Font is installed on the Mac
Dumped name of font on Mac using the iterator method mentioned in a forum shows the font name as: LiberationSans-Regular
Font is included in the main source tree of the code next to build.settings etc
Build.settings contains:
UIAppFonts =
{
“LiberationSans-Regular.ttf”
},
Using another device detect lib mentioned elsewhere, have this block of code in various locations (using director lib):
mainFont = “Liberation Sans”
local device = require(“device”)
if(device.isApple)then
mainFont = “LiberationSans-Regular”
end
I’ve verified that the device.isApple is working on actual devices via native alerts
The Font Book shows the Font name as Liberation Sans Regular, and I’ve tried both ways but neither work
Has anyone implemented this font or know how to trouble shoot this further? I’m running out of options, thanks!
It appears that you have followed all of the recommended steps. Can you please try the same thing with another custom font, and see if the same behavior happens? This might be an issue isolated to the particular font (not common, but it happens).
It appears that you have followed all of the recommended steps. Can you please try the same thing with another custom font, and see if the same behavior happens? This might be an issue isolated to the particular font (not common, but it happens).
Unfortunately I didn’t f.p. What I ended up doing is setting global values for the font, and doing a check for platform. In the case of iOS i used native font/Helvetica.
darn… ive used custom fonts all throughout my app ill post here if i find a fix, just curious that code you used in your number 5 bullet point where did you add it? I’m using storyboard not director though…
Not sure how you do this in storyboard, but I have a global class that I load with the detection methods for platform, then in each view near the top I run through some setup/init code in which I specify a font declaration. I suppose I could have done it differently, but I was trying to avoid a lot of global classes for performance reasons, and also it was my first corona app so I was still figuring out some of the architectural stuff.
no it’s just one font, with a pixelly style to go with the theme of my game… @brent if youre listening ive tried with different custom fonts and get the same, the font just doesnt show up… help if you can!
Unfortunately I didn’t f.p. What I ended up doing is setting global values for the font, and doing a check for platform. In the case of iOS i used native font/Helvetica.
darn… ive used custom fonts all throughout my app ill post here if i find a fix, just curious that code you used in your number 5 bullet point where did you add it? I’m using storyboard not director though…
Not sure how you do this in storyboard, but I have a global class that I load with the detection methods for platform, then in each view near the top I run through some setup/init code in which I specify a font declaration. I suppose I could have done it differently, but I was trying to avoid a lot of global classes for performance reasons, and also it was my first corona app so I was still figuring out some of the architectural stuff.
no it’s just one font, with a pixelly style to go with the theme of my game… @brent if youre listening ive tried with different custom fonts and get the same, the font just doesnt show up… help if you can!