Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Full character set for TextMeshPro Font Asset Generator for Chinese, Japanese and Korean languages

Discussion in 'Localization Tools' started by masta-yoda, May 26, 2023.

  1. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    I have a Unity game where I recently added localization to many languages including Chinese simplified, Korean and Japanese. I have generated font assets for these languages using a predefined (custom) character set and it works great. My game is multiplayer and players can set their name in these languages to whatever they want and while a predefined char set works great for game elements known in advance (like menus), it doesn't work for player names. Where I can find the complete list of Chinese, Japanese, and Korean Characters or existing TMP Font Assets so I can use them to generate my font asset? Maybe there is another way to generate a font asset and include all the characters for the given languages?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,820
    Generating a font set for all the characters could be huge for some languages, I would not recommend it. Typically you would have your character set version and then a fallback to a dynamic font of the same type which can populate an atlas with any missing characters. I believe the TMP essentials has a font set up in this way to show how it can be done.
     
    masta-yoda likes this.
  3. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    Thanks for sharing the idea! Dynamic font, interesting, I haven't tried that. I assume it does fallback logic in runtime, can it affect performance?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,820
    Yes the fallback logic is done at runtime. Dynamic fonts are something we recommend for this use case. There's some performance impact when it generates the glyths but it shouldn't be much of an issue.
     
    masta-yoda likes this.
  5. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    Perfect! I'll use exactly that then
     
    karl_jones likes this.
  6. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91