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.
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.
I was finally able to get Chines fonts working using the following method:
Use the file the Chinese user linked to above, for the base 3500 character set
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
Select 4k*4k resolution.
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.
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.
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
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.
Problem solved:
The Atlas resolution was to small with 512 with 1024 it works fine.
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 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.