Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

TextMesh Pro Table of General Standard Chinese Characters

Discussion in 'Unity UI & TextMesh Pro' started by Stephan_B, Sep 23, 2018.

  1. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,148
    Back in 2013, the Chinese government published a list of essentially all the characters that you might expect to encounter in electronic communication. The Table of General Standard Chinese Characters contains a list of these characters.

    This list is comprised of 8105 characters which are divided into 3 groups. The first group contains the most commonly / frequently used 3500 characters. The 2nd group contains 3000 still common but much less frequently used and the last group the remaining 1605 which are considered rare.

    Attached to this post are the list of these characters in hex values which you can copy paste in the Font Asset Creator using Unicode Range (Hex) option as seen below.

    upload_2018-9-23_14-50-45.png
     

    Attached Files:

    Mauri likes this.
  2. E2R_Ben

    E2R_Ben

    Joined:
    Oct 30, 2009
    Posts:
    143
    Hey, really useful thanks, but how did you paste a 3500 hex code string into the TMP window?
     
  3. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,148
    You paste it in the Character Sequence portion of the Font Asset Creator as shown above.
     
  4. E2R_Ben

    E2R_Ben

    Joined:
    Oct 30, 2009
    Posts:
    143
    upload_2018-10-12_12-41-3.png

    Yeah it says the string is too long
     
  5. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,148
    That is an editor error which will go away in Unity 2018.3 (I believe). This error is due to the 65,535 vertices limitation which also affects the editor. The good news is it doesn't prevent the Font Asset Creator from doing its job.
     
  6. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    @Stephan_B Is it possible to get the breakup of Korean Character and japanese like the one you have for chinese above?
     
  7. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,148
    I would assume there are similar lists available for Japanese but I am not personally aware of any. This is where it would be nice to get some insight from someone fluent in the language.

    In regards to Korean / Hangul, the language is comprised of 11,172 characters.

    Having said all of that, once the next release of TMP is available with Dynamic SDF support, managing languages like CJK which have large character sets will get much easier.
     
  8. Fachmah

    Fachmah

    Joined:
    Jan 11, 2017
    Posts:
    3
    Is there an ETA on the next release of TMP? :--)

    Im currently working on a project which needs support for all unicode characters, really looking forward to the dynamic SDF support!
     
    Last edited: Jan 10, 2019
  9. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
  10. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,148
  11. fgc0109

    fgc0109

    Joined:
    Feb 28, 2018
    Posts:
    1
    e.....I'm Chinese
    i write characters into a file, and select "characters from file" option
    i think it's easier to read and use
    QQ截图20190124223655.png

    you can find character files here
    https://gist.github.com/z-rui/4cb3431f2bcf26ea39cd569a58e66003/
    (it's not my repo, i just find it)

    ps. i think 2048*2048 for 3500 characters is not enough,the character seems a little blurred
    but 4096 make the file too large... about 17MB,in mobile phone is a problem
    (i use 4096*4096 for 3500 characters before, and now i use 4096*4096 for more than 7000 characters)

    pss. i still have a question : TMP seems has use different shader between pc and mobile
    but at some place i need characters has same effect both pc and mobile (just like tittles)
    what should i do ? don't use advance effect like 'lighting' and 'glow' ?
     
    Last edited: Jan 24, 2019
  12. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,148
    Split the characters between a Primary font asset that is 2048 x 2048 and one of more fallback font assets. This way, the Primary can contain the more frequently used characters sampled / using a higher sampling point size and the less frequently used characters contained in any fallback use a lower sampling quality.

    When using fallback font assets, the ratio of Sampling Point Size to Padding must be the same but texture size can be different. So for instance, if the Primary has a sampling point size of 80 with padding of 8, then any fallback could have a sampling point size of 60 with padding of 6 or point size of 50 with padding of 5.

    Having said that please see the following post / video about the soon to be released Dynamic SDF system which will make this a lot simpler.

    The same shaders are used on all platforms. The mobile distance field shaders provide better performance mostly because of their reduced feature set.

    Shader selection is never changes based on platform so if you create a Material Preset that uses the mobile distance field shader because you only care to have outline + shadow on the style of text then that same material and shader will be used on all platforms. The text will render exactly the same on all. If you create another material preset where you want to use bevel and similar features, then this shader will also be used for any text using the material preset on all platforms.

    The choice of shader is based on the features / visual design you want for the text using the given Material Preset and shader.