Text characters not visible in the built game/app

If you have a font that correctly displays characters in the Editor but it doesn’t display them in the device, then it’s very likely because Unity cannot find the characters in the fallback font used.

For example, you may have a custom Font made by you which does not include Thai characters. The font is imported as a Dynamic Font and the font data is included. When you write text using Thai-specific characters, the characters are displayed correctly in the Editor.

สวัสดี ครับ/ค่ะ

But when you build your application and test on a device you see something like this:

����������/���

What happens is that Unity tries to look for the characters in the Font you provided and it is not able to find them. It will then try the default OS font, but in this case, it does not contain Thai characters.

To solve this problem, you can add a Font Name (comma separated) in the Font Importer, to let Unity know which fallback fonts can be used to display the characters in case it’s not found in the font itself. For example on iOS, you can use the Thonburi font for Thai characters as a fallback Font. When you add the Thonburi Font Name, then the text will be displayed as expected:

สวัสดี ครับ/ค่ะ

You can read the details of the Font Importer here:

And here you can find the list of Fonts for iOS:

http://iosfonts.com/
http://support.apple.com/kb/ht4980
http://support.apple.com/kb/ht5484
http://support.apple.com/kb/HT5878

On Android devices:

You can also connect to the device using adb shell, and browser to the /system/fonts folder to see the list of Fonts in your device. Note that not all devices have the same fonts, so make sure to check all your target devices for the available stock Fonts, to use as fallback Font Names.

1 Like