Fixing Japanese, Chinese, and Korean Text Issues in TextMeshPro
Do you see a lot of this glyph □ in your Japanese or Chinese game builds?
Here’s how to solve it.
When working with TextMeshPro (TMP) in Unity, you might encounter issues displaying Japanese and Chinese characters. These languages have extensive character sets, and TMP requires that all characters in the font be included in the atlas to render properly. If your text isn't appearing correctly, it's likely because the necessary characters were not included during font generation.
Understanding the Issue
TMP uses an atlas-based system for rendering fonts, meaning that only the characters included in the atlas can be displayed. While TMP provides premade character sets, many Asian characters—especially those from Japanese and Chinese—are often missing from these sets. As a result, when trying to display text in these languages, you might see blank spaces or missing glyphs.
How We Fixed It
To resolve this issue, we manually identified all the necessary Japanese and Chinese characters and ensured they were included in the font atlas. Here’s how we did it:
Identified the Required Characters – We gathered all the characters used in our project and compiled a complete set.
Manually Added Them to the TMP Font Asset – Instead of relying on TMP’s default character sets, we manually specified the characters in the TMP font settings.
Regenerated the Font Atlas – By including all required characters, we ensured that the atlas contained the full character set needed for proper rendering.
If you are experiencing the same issue, we recommend following a similar approach. You may also have existing documents or resources containing the necessary characters, which you can use to compile your own character set.
You can copy and paste required characters here. (JP/CN/KR)
Final Thoughts
Ensuring that all necessary characters are included in your TMP font asset is crucial for proper text rendering in Japanese and Chinese. While TMP does not automatically support every character out of the box, a manual approach can help overcome these limitations and ensure a seamless user experience.
If you need a reference, we still have a document containing the full set of characters we used—feel free to reach out, and we can share it with you!
Today's Trivia
By the way, the Japanese katakana character "ロ"(“Lo/Ro”, sound) looks like □.
Similarly, the Japanese and Chinese character "口" (meaning "mouth") also looks like □, but this is not a mistake. It's a bit confusing, isn't it?