Unity - TextMeshPro displays Chinese

Unity TextMeshPro displays Chinese

Unity's built-in font assets (Font Asset) cannot display Chinese characters. You can perform the following operations to generate font resources that support Chinese.

Download the text of commonly used Chinese characters

https://github.com/DavidSheh/CommonChineseCharacter

Get ttf format font

Individual developers recommend the Siyuan series of fonts.
If you just want to learn and communicate, you can directly choose the font C:/Windows/Fontsfrom it
and drag the font file directly into the Project window of the editor.

Generate Font Asset

Select Window → TextMeshPro ( do not select Text by mistake ) → Font Asset Creator to open the font creation window. Drag
Open the Create Font window
the prepared font file (TTF) and character file (commonly used text) into the Source Font File and Character File in the window respectively, and then follow
the Adjust the generation parameters according to your own needs.
Click the Generate Font Atlas button and wait for the generation to complete.
Generate font window
After the generation is completed, click the Save or Save as... button to save the FontAsset.

Using FontAsset

Select the just saved FontAsset in TextMeshPro to make the TMP component display Chinese
Select font

Guess you like

Origin blog.csdn.net/weixin_43430402/article/details/129155970