Table of General Standard Chinese Characters

I still continue to recommend having different sets of font assets for different language regions.

For instance, for Latin languages, I would include the Extended ASCII in my Primary font asset and Cyrillic and perhaps Greek in two static fallbacks or perhaps have both handled by a Dynamic Fallback. I would include one additional fallback that contains all the required characters to display the language selection menu / ui in all the different languages.

For Chinese, I would have a primary font asset that is static that includes all the known Chinese characters used in the project and then one dynamic fallback to catch other characters. Would again add one additional fallback (the same one as previously) to display the language selection menu / ui.

Repeat for Japanese and Korean and Arabic languages.

These additional resources, could be loaded via Asset Bundles when these languages / regions are selected.

Again, this all depends on the amount of text in the project where you could go with a primary and few static fallbacks and then rely on the dynamic system for everything else.

P.S. Performance improvements to the dynamic system are coming in the next release including Multi Atlas Support.

Thanks for the prompt reply. Is there a way to override the default font used for all TMPro components ?

Is there an ETA for the next release ?

You can change the Default Font Asset in the TMP Settings.

Hopefully within the next 10 to 14 days.

That’s just for the editor though ? I assume the actual fontAsset in TMP instances has to be set manually at runtime ?

That should work for runtime as well but I would not suggest handling localization / switching font asset for specific languages that way since most of the time this language switch can involves changing other assets / sprites / point size, other settings, etc.

Most of the time, localization is handled by some resources / language manager or localization tool like I2 Localization for instance that tracks what needs to be changed for any given language.

We do only have to localize actual strings - I guess I have to just use the dynamic fallback for all languages then.

I was finally able to get Chines fonts working using the following method:

  1. Use the file the Chinese user linked to above, for the base 3500 character set

  2. Download fonts from Google Fonts (their selection is surprisingly good) - the fonts I’d been using to date were failing - maybe they were missing too many characters

  3. Select 4k*4k resolution.

  4. Generate file. It should only take a couple of minutes. Anything longer than that, and something is wrong.

With the introduction and release of the Dynamic SDF system in Unity 2018.3 or newer, for most of the previous use cases, it should not longer be necessary to create font assets that include all of the characters included in this table.

The recommended workflow is to continue to create / use a primary font asset that is static and contains all the known / used characters in the project but to now rely on a dynamic fallback for the characters that are unknown and coming from user input.

Not available for Unity 2017.4 thought right? I ship in 10 days, there are 2000 wishlisters waiting, no time to update!

You are correct.

The Dynamic SDF system was introduced in the TMP package version 1.4.0 for Unity 2018.3 or newer.

Just another tip for anyone using the above Chinese user’s file, I’d suggest adding the Latin alphabet, punctuation, and numbers. That way you don’t have to worry about a fallback system, and its only an extra ~1% greater number of characters.

@Stephan_B I am succesfully using fallback fonts for my project, but the problem is that as we are adding more languages, these fallback fonts for TMP are increasing in size in the order of 30-40 MB and that’s bad for our mobile app. We need to offer support because our app is receiving info in different languages from social media. Do the new updates handle this better than this approach? Thank you in advance.

Two new features were added over the past year / months which will significantly improve the workflow when working with languages such as CJK.

The first feature is support for Dynamic SDF makes it possible to add glyphs and characters to font assets in the Editor and at Runtime. See the following post and video.

The second feature is support for Multi Atlas Textures per font asset which allows a font asset to add additional atlas texture as needed to handle the growing list of glyphs and characters being added to it. See the following post about this feature.

In terms of how these features impact the workflow for handling CJK and localization, the recommendation remains to create and use Primary Static font assets that contain the known characters in the project for any given language or groups of language. Then to use and assign as fallback to the static primary a Dynamic font asset with multi atlas texture enabled to handle all unknown / other characters coming from user input or other sources.

1 Like

Thank you @Stephan_B for your quick response. I’ll explore the options that you are providing. So far we are developing with unity 2018.2 and maybe can not upgrade in the immediate term. Is it possible to make these languages as packages that the user downloads and unity installs in TextMeshPro as fallbacks? because as I mentioned before. we are reading info from posts, so we need to support all characters in different languages. thank you

Sorry to revive a dead thread, but can anyone think of a way to convert those characters above to traditional?

@sandworm

and Noto Sans Traditional Chinese - Google Fonts might be able to help you.

3 Likes

The dynamic mode seem to work almost perfectly.
How ever it seems to not find some characters even tough they exist in the font.

Example:

Font:
Noto Sans Simplified Chinese

Unity 2021.2.6f1
TextMesh 3.0.6

Test string:
每24小时提供每24小时

This works on the google website testing the string = the font contains all symbols.
But in the editor it looks like this, dynamic mode is used, other characters are found.
7896301--1005670--upload_2022-2-14_19-44-25.png

Problem solved:
The Atlas resolution was to small with 512 with 1024 it works fine.

3 Likes

It would be nice if by default there was an option in TMPro to generate a font in Chinese, which automatically handles creating the main and fallback fonts, all linked together and ready to go. I mainly say this because I keep somehow screwing up and making random characters not render.

I used the list from PDF on this Wiki page to generate static SDF Font Asset for Traditional Chinese
Here’s TXT file with these characters I used in Asset Creator (when choosing Characters from File option in Character Set): https://gist.github.com/RunninglVlan/013113b9d4e3f73eeb303acd1d7f805d

1 Like

Hi,

I have a problem creating a font with Chinese language support. I use the same font as in your example, I use the same character set that you used, but I get an error when creating the font.


Unity 6000.0.30f1

What could be the problem?