Unity Dev, Font Fallback not working!

Created on: 18 Jun 25 11:23 +0700 by Son Nguyen Hoang in English

Fallback font not working.

Currently in a Unity Project. The current FontAsset lacks important character (e.g Sign Symbol, basic glyph such as “/” or “:").

However, the Unity game not showing the fallback character. We wonder why that happens and fortunately we solved how the bug happens. The issue is simple, the special character that is not supposed to be existed inside the first Font Asset do exist. But they are “invisible”.

Thus, fallback font did not work simply the character technically do exist! I found the bug somewhat interesting, and worth to note it down. So I write this note to summarize how to fix.

Key Software: FontForge

Simply open the font, it any glyph not exist, it must be marked with “X” symbol.

alt text

In the above image I provided the illustration. If the “X” is marked, this mean the glyph not existed. Otherwise, the glyph technically do exist but basically INVISIBLE!

Thus, when importing to the font asset, it never trigger the fallback!

Solution

Right-click on the Glyph inside FontForge, select “Cancel” to mark it non-existent.

Then generate a new .tff file from FontForge. But now, we do have another issue:

Issue on Unity Font Asset

The actual important unit we must take care of is the Unity Font Asset. Assuming that we update the font (.tff) file. BUT, how to trigger the changes on the corresponding Font Asset?

Assuming that the old Font Asset having 10+ preset material. It would be tiresome to manually recreate one by one if we have to get rid of the old material preset.

My recommended way is to force the Font Asset rebuild (update Atlas Texture)

alt text

Then remember to trigger the generation then hits save:

alt text

Back To Top