I don’t know why this is happening, here is an example screen of the problem:
This is affecting both running the game in the editor and in the built version.
Here is how I set up the font fallback. The fonts I use I got from Google Fonts:
If I print the text that I’m setting in the Label in the Debug.Log it shows correctly.
I’m using Unity 2022.3.53f1
Quick question—could you confirm that the UITK Text Settings are properly assigned to your Panel Settings?
If that checks out, I’d recommend verifying whether the individual FontAssets contain the characters you’re trying to display. You can use this API: fontAsset.HasCharacters()
.
If the FontAsset does have the characters, but they’re not being found through the Global fallback, the issue might be on our side.
Love the design by the way!
Hi Hugo, thanks for replying.
I checked and the UITK Text Settings is assigned to the Panel Settings.
I also checked if the FontAssets contain the characters, I used this code:
controlsPanel.Q<Label>("Text1Label").text = LocalizationSettings.StringDatabase.GetLocalizedString(howToPlayTable, "howtoplay.controls.text1");
Debug.Log(controlsPanel.Q<Label>("Text1Label").text);
if (!fontAsset.HasCharacters(controlsPanel.Q<Label>("Text1Label").text, out List<char> missingCharacters))
{
if (missingCharacters != null)
Debug.Log($"MISSING CHARACTERS [{missingCharacters.Count}]: {new string(missingCharacters.ToArray())}");
}
And get this result for the Korean font:
So it actually looks like the font is missing some characters.
The font that I’m using is this one:
So what could it be? Some problem importing the font?
These are the settings that I’m using: