Custom font problem

Hi again,
OK, found the problem. You’re defining your font (The “UIAppFonts” setting) in config.lua, while this actually needs to be defined it the build.settings file.

Let me know what happens after you change it over. [import]uid: 200026 topic_id: 34945 reply_id: 139030[/import]

Argh, still doesn’t work :confused:
Here is the link to the updated project: corona_0.1.zip [import]uid: 76405 topic_id: 34945 reply_id: 139031[/import]

Argh, still doesn’t work :confused:
Here is the link to the updated project: corona_0.1.zip [import]uid: 76405 topic_id: 34945 reply_id: 139033[/import]

Hi @qaisjp,
I just experimented with this on my side. The solution was to install the font in OS X Font Book. Have you done this already? Double-click the font file and it should open the Font Book application. Then click “Install Font” and it should go to work. After I did that, it showed up perfectly on the Simulator screen.

Brent [import]uid: 200026 topic_id: 34945 reply_id: 139049[/import]

Yeah it worked when I tried that, but shouldn’t it work anyway? Would it work on Android/iOS?
Thanks! [import]uid: 76405 topic_id: 34945 reply_id: 139070[/import]

Yes, as long as you specified the font properly in your “UIAppFonts” table, and you’re calling it (in code) by the name you get from native.getFontNames() after it’s properly installed in FontBook, it should work.

On Android, it’s a bit different. You have to specify the custom font by its file name without the extension, not by font family name like you do on Mac or iOS. For example, if the font file name is “Quicksand_Book.otf” in the directory, then your display.newText() call needs to access it by file name such as “Quicksand_Book” without the extension. The reason is, the app’s custom font is not “installed” on Android, so Corona needs to load it by file name (minus extension).

Hope this helps!
Brent [import]uid: 200026 topic_id: 34945 reply_id: 139182[/import]

Alright, thanks! [import]uid: 76405 topic_id: 34945 reply_id: 139183[/import]