How to make Fallback Fonts work?? Is this a bug or am I doing it wrong???

I am trying to use the built in Font fallback system.

If, for example, I have a Font set up like this one:

Is that set up correctly? I have a font Montserrat Extra Bold and when it encounters missing characters, I want it to use NotoSansCompiled-Medium (which is a massive test almost-full-Unicode font I made).

However, when I build to Android, if I assign any special language Unicode to a Label with this Font, it does not actually use the fallback. I get ☐☐☐ for the special characters where the fallback could definitely show them.

I can confirm Unity knows Montserrat Extra Bold doesn’t have these characters with Font.HasCharacter(). But yet it still doesn’t use the available fallback.

I see someone else posted the same issue here from 2018 with TMP: Fallback font not used

Is this a known bug or are we doing it wrong? If it is not a known bug or usage issue, please let me know and I will submit a bug report.

Thanks for any help.

Hi @mikemohan !

The legacy Text system is not supported in UI Toolkit. In fact, we are converting Font to TextCore FontAsset on the fly when provided a Font. This was made to ensure backward compatibility when we switch the TextEngine to TextCore. Note that we are on the verge of deprecating the Legacy text system in favour of TextCore in IMGUI as well. The fallback font system offered by TextCore is both more robust and more comprehensive. It supports Global and local fallback as well as Dynamic OS font and more.

What are the reasons for using the Legacy Text System over TextCore? My recommendation would be to change to using TextCore with FontAsset.

1 Like

Hi @HugoBD-Unity ,

We have been using the legacy Text system for our project that allows user-generated comments in various Native Indian languages. Now, we had tried using TMP back in the day but it took too much time to load the text in the comments due to more than 10 assigned fallback fonts containing different language fonts. However, the legacy Text system loaded the different language comments way faster with the same fallback fonts assigned, almost instantaneously.

Now after updating to Unity 2023.2.x, I see that the fallback font system of the legacy Text works in the Unity Editor but does not work in the mobile builds (Android and iOS).

Does this mean that the bugs related to the fallback font loading in the legacy Text system won’t be solved?

Which UI System are you using in 2023.2 ?

I am using Unity UI version 2.0.0 on Unity version 2023.2.17f1 for Android build target platform with Built-in Render Pipeline.

Also, below is the screenshot of the fallback font settings in the main font used in legacy text component.