What’s also weird is that often (maybe 50%?) of the time the build doesn’t show up on the device, although Corona tells me it’s been copied over and no errors are generated. Not sure if this is a different problem, or part of the same thing.
This is what the console log looks like when it doesn’t actually copy:
Jul 25 06:49:58.658 Installing ‘Robotronish.app’ on Jay’s_iPad_mini …
Just rebuilt another game using a custom font and it worked fine on the device – copied that font to the new project and set it as mainFont in my main.lua and did a build – and it doesn’t work on the device.
So something(?) in my new project is blocking custom fonts from working?
I’m going to start ripping things out and see what happens…
Below is a link to the project that consists of a main and menu (composer scene file). Main goes straight to menu and there’s a button that should say “Play” using the included custom font. But on my devices and the Xcode simulator all I see are squares with question marks. Works fine in Corona Simulator.
The failing to copy the app on build does happen to me from time to time. It seems to happen more on my iPad than my iPhone. I think you’re the first one to report it in the forums, so it’s a bit more wide spread that something in my setup. I’ll see if I can repo it and catch the full log to send to an engineer.
I ran and built your test app on my iPad 4 with no changes. Here are the results:
Simulator (2906): worked (see 1st screen shot)
iPad 4 (iOS 9.3.2): worked (see 2nd screen shot)
So at this point since no fonts seem to work it has to be something local blocking it and I really have no clue what that might be… I’ll try to have a conversation with the engineers in a bit to see they have any ideas.
Does this font/method of loading work in other apps where you do have custom fonts work?
Can you do another test this time loading the font old school (include the UIAppFonts block in build.settings, load by Font Family name instead of file name) and see if that works?
This is the first project I’ve done since the new way was available. But I just switched to the new way in an older project and it freaking works. Argh!
I went back through that sample project and there’s almost nothing there – nothing that should cause problems at all. But even that little sample project will not show a custom font on a device. I’ve tried both the old and new ways with no luck on iOS…
…although it does work when installed on my Android device. Double argh!!!
I discovered the problem, and it looks like Corona Labs’ fault rather than mine!!! Woohoo!
When I did a build I chose “What the Shell?!” as the application name, but this evening I used that as the name of the build folder, I found Corona Simulator barfed on it. So then I changed the name of the folder and changed the build Application Name (took off the ?!) and now the custom fonts are showing in the game!
The folder problem happens with the question mark – don’t know if that’s the same for the custom font issue (or if it’s the exclamation point, or both) because it’s about 4AM and now that I found the problem I’ll leave it to a CL engineer to look further.
Can you file a bug report on this please? You will need a complete project (main.lua, config.lua, build.settings and any assets such as the fonts) that demonstrates the problem. Put that in a .zip file and use the Report a bug link at the top of the page.
It’s bug #46860 – and I bugged the other one separately because I figured they might actually be two different areas of the code, two different types of fixes, whatever. Just in case.