top of page
搜尋

Unity TMPro顯示韓日泰等多國語字體!豆腐塊問題解決!



Watch Video 觀看影片

TMPro Unity Display Multi-Languages Correctly No tofu

讓TMPro顯示多國語沒有豆腐塊

Best Method

最佳方法

TMPro Unity Display Multi-Languages Correctly No tofu讓TMPro顯示多國語沒有豆腐塊

1Download fonts like noto fonts

下載noto之類的字體


2drag fonts to your unity project (grey Aa symbol)

把字體拖拽到unity項目中(Aa灰色標誌)


3 select the font,press CTRL+SHIFT+F12 at the same time

選擇這個字體,同時按下CTRL+SHIFT+F12(Win系統)

MacOS:cmd+shift+f12


4 make font SDF (blue "F" symbol)

由此產生了字體SDF(藍色F標誌)


5drag the blue “F” font to your primary font,cover it

把藍色F字體拖到之前的字體位置,覆蓋


6 select your lead font, for example,TC(Traditional Chinese),then drag other members like(JP,KR,THAI)into TC's fallback

all of the language characters can be displayed correctly

選擇你的首選字體,比如繁體中文,然而拖拽其他成員,比如日韓泰字體到繁中的fallback,這樣所有的文字都可以被正常顯示


Old manual method

  1. Download the Korean font. For example https://fonts.google.com/specimen/Noto+Sans+KR.

  2. Import the .ttf font files into your Unity assets.

  3. In Unity, open the Font Asset Creator.

  4. Drag the font file.

  5. In Character Set, instead of "ASCII Characters", pick Custom Characters and write down the characters you want to include. Another way is to select a Unicode range, but I haven't looked the range of Korean characters yet.

  6. Click Generate, then Save.

  7. In your TMP Text shape, select the new font.

 

emoji

type in <sprite = 1> TMPro can display the first emoji, <sprite = n> the Nth emoji will be displayed

輸入<sprite = 1>會讓TMPro顯示第一個emoji,輸入<sprite = n>,會顯示第n個emoji




11 次查看0 則留言

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page