Fonts not working in store build

We are attempting to build for the windows store. When I run the .exe, the fonts used in the game do not appear. I haven’t installed that font but it should be embedded. The build file doesn’t include any specific references to a font (we took it directly from the Corona Docs) Is there something I need to add to the build file to make the font work? The font does work on systems that has it installed.

You need to add the font to your build and not rely on it being installed on the target machine.

Also, I suggest you use .ttf (TrueType) fonts. The reason is outlined in this guide:

https://docs.coronalabs.com/guide/system/customFont/index.html

Take care,

Brent

Thanks for the input. We are using .ttf. Still having the issue. Any other ideas?

This is how I reference my fonts and it works on all platforms (with the ttf files in the same folder as my Lua files)

if system.getInfo( "platformName" ) == "Win" then --windoze \_textFont = "zekton free" \_monserratBlack = "montserrat black" \_monserratLight = "montserrat light" elseif system.getInfo( "platformName" ) == "Android" then --Android \_textFont = "zekton" \_monserratBlack = "montserrat-black" \_monserratLight = "montserrat-light" else --iThingy \_textFont = "Zekton Free" \_monserratBlack = "Montserrat Black" \_monserratLight = "Montserrat Light" end

There are subtle changes for each platform.  Maybe this will help you

It shouldn’t be necessary to do per-platform font selection anymore (that was in the past). If you put the font(s) in your main project folder (not a subfolder) and point to them directly by the full font file name – not the “display name” or anything like that – including extension, it should work fine across all platforms.

I guess we’d need to see a direct simple example (code) of it not working to diagnose further.

Best regards,

Brent

It would appear you are right Brent (at least on Windows and Android so far)… I guess I missed the memo

You need to add the font to your build and not rely on it being installed on the target machine.

Also, I suggest you use .ttf (TrueType) fonts. The reason is outlined in this guide:

https://docs.coronalabs.com/guide/system/customFont/index.html

Take care,

Brent

Thanks for the input. We are using .ttf. Still having the issue. Any other ideas?

This is how I reference my fonts and it works on all platforms (with the ttf files in the same folder as my Lua files)

if system.getInfo( "platformName" ) == "Win" then --windoze \_textFont = "zekton free" \_monserratBlack = "montserrat black" \_monserratLight = "montserrat light" elseif system.getInfo( "platformName" ) == "Android" then --Android \_textFont = "zekton" \_monserratBlack = "montserrat-black" \_monserratLight = "montserrat-light" else --iThingy \_textFont = "Zekton Free" \_monserratBlack = "Montserrat Black" \_monserratLight = "Montserrat Light" end

There are subtle changes for each platform.  Maybe this will help you

It shouldn’t be necessary to do per-platform font selection anymore (that was in the past). If you put the font(s) in your main project folder (not a subfolder) and point to them directly by the full font file name – not the “display name” or anything like that – including extension, it should work fine across all platforms.

I guess we’d need to see a direct simple example (code) of it not working to diagnose further.

Best regards,

Brent

It would appear you are right Brent (at least on Windows and Android so far)… I guess I missed the memo

Is there a solution for making fonts work in a windows build? I now have tried everything… converting to a .ttf and looking up the “real” name of the font… BUT still I get the WARNING: Could not load font XY. Using default font.

What am I missing here? And how can I make the font work on Windows like on Mac and iOS and Android?

Any help welcome!