Search Unity

TextMesh Pro The Russian letters aren't shown. Instead of them blocks. Help please!

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by MramidK1, Apr 28, 2017.

  1. MramidK1

    MramidK1

    Joined:
    Jul 16, 2016
    Posts:
    6
    Hi, everybody! I apologize for my English) Google the translator)


    2017-04-28_10-38-40.png 2017-04-28_10-38-58.png 2017-04-28_10-38-40.png 2017-04-28_10-38-40.png
    If it is short, then the Russian letters and symbols aren't displayed. I tried to generate shrit via the generator, but also he doesn't see the Russian symbols. Don't prompt as it is possible to solve this problem? I apply screenshots.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    In the Font Asset Creator - Character Set, you have selected ASCII which will only include the ASCII character set in the font asset.

    To include characters for different languages like Russian which uses the Cyrillic character set, you have to include those in your selection. According to the Unicode Chart where you can learn about the Unicode range for all languages, Cyrillic is located in the range of 0400-04FF.

    Here is an example of an SDF Font Asset that I can use as Fallback using Unicode Range 400-4FF which include the Cyrillic set.

    upload_2017-4-28_1-24-10.png

    Please take the time to watch the video about Font Asset Creation as all these options are explained including localization. I also strongly suggest you watch the video about Material Presets which is equally important.

    I also suggest you use SDF 16 or SDF 32 as this will give you the most flexibility and allow you to use Material Presets to define different visual styles for your text.
     
  3. MramidK1

    MramidK1

    Joined:
    Jul 16, 2016
    Posts:
    6
    thanks for the help
     
  4. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    169
    To the creator, respectfully, you are making this way too difficult.

    There are a handful of common languages that should be simple to implement, with standard instructions:

    Extended ASCII (Latin-based languages) + Cyrillic covers 95%+ of games and fonts

    Then separate instructions for Chinese, Japanese, Korean.

    We shouldn't need to hunt down font tables in obscure PDFs.

    So:

    What are the precise settings I need to enter to have Extended ASCII + Cyrillic?

    Edit: Here are the settings that worked for me:

    0000 - 4FF

    Giving English, German, Russian.

    Easy right!? No need to watch a 20 minute tutorial :)

    Edit: you'll probably need a 4k Atlas for this. Zooming in I can see a lot of font simplifcation
     
    Last edited: May 21, 2019
    yuliyF likes this.
  5. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    If you are using the latest release of the TextMesh Pro package which is version 1.4.1 for Unity 2018.3 and Unity 2018.4 or version 2.0.1 for Unity 2019.x with the new Dynamic SDF support, you simply need to create a dynamic font asset and make sure your select font contains the appropriate characters and that is it.

    If you are using the previous version, you need to define the range of characters you wish to include which would be extended ASCII and then create a fallback font asset that contains the Cyrillic character set which is unicode range 0400-04FF as shown in my previous post. Then assign this Cyrillic font asset as fallback to your primary Extended ASCII one.
     
  6. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    169
    Thanks for the reply. I'm using I2 Localisation, so I can just set a separate font.

    I tried with 0000-4FF with a 4K Atlas and 32 render setting, but it crashed the editor.
     
  7. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    0000-04FFF would result in adding a bunch of undesired characters. Each language exists in a given unicode block so it is best to either use the dynamic SDF system (if you don't want to worry about any of this) or to specify the unicode block you really need.

    I realize the learning about Unicode is boring but it is there for a reason.

    P.S. I will consider adding an addition option in the Font Asset Creator to include something like Extended ASCII + Cyrillic.
     
    yuliyF, Skyblade and Rich_A like this.
  8. Skyblade

    Skyblade

    Joined:
    Nov 19, 2013
    Posts:
    73
    Ok, where I can get Arial font with Cyrillic characters? I see only LiberationSans.
     
    Last edited: Jun 6, 2019
  9. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    A good place to look for fonts is Google Fonts where you can select which language you are interested in.

    Commercial fonts such as Arial are available from MyFonts.com where the appropriate license must be acquired.
     
    Skyblade likes this.
  10. Skyblade

    Skyblade

    Joined:
    Nov 19, 2013
    Posts:
    73
    I have similar problem when copying cyrillic text to a clipboard.
    Instead of the text I see some garbage:
    upload_2019-6-9_19-44-11.png
    What's happening?

    If I check scene asset, I can see pretty normal Unicode sequence:
     
  11. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    What text are you copy / pasting? Provide me with the exact text please.

    Can you post an image of the font atlas texture of your font asset or provide me with the font asset and font file?
     
  12. Skyblade

    Skyblade

    Joined:
    Nov 19, 2013
    Posts:
    73
    I'm copying "Текст" string.
    If I paste it into any text field, say, Notepad, it's corrupted.

    Here is the atlas (Arial SDF).
     

    Attached Files:

  13. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    I looked at your font asset and everything appears to be working as expected. Copying the text from the input field into Notepad works fine. Copying from Notepad back to the text field works fine on my end as well.

    Can you post images or some video of what you are experiencing?

    What version of Unity and TextMesh Pro are you using again?
     
  14. Skyblade

    Skyblade

    Joined:
    Nov 19, 2013
    Posts:
    73
    I'm using Unity 2019.1.5.f1 (also applies to newer versions up to 2019.3.0a5) and TextMeshPro 2.0.1.
    Here is the sample project below.
    Here is the sample video:
     

    Attached Files:

  15. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    Thank you for the video.

    This appears to be a bug in the Editor related to the Copy / Clipboard function. This appears to be an issue introduced at some point in 2019.1 and still present in early alpha of 2019.3 but not in the latest.

    There are a few bug reports about this already. I'll check internally to see when the fix for this will be back ported to previous version of 2019.x.
     
    Skyblade likes this.
  16. alex_unity140

    alex_unity140

    Joined:
    Nov 30, 2017
    Posts:
    1
    Same issue with any copy/paste actions and cyrillic symbols in Editor. Using 2019.2.0b7 :(
     
  17. LexaMV

    LexaMV

    Joined:
    Feb 20, 2018
    Posts:
    7
    Hi, I also had this problem before. And I realized that it is easier to set the TestMeshPro characters that I need in Russian. I ask 33 uppercase letters, 33 ordinary letters, 10 digits, and all punctuation, math, etc. Almost always, I do not find 2 - 3 characters, but this is not essential.

    Привет, я то же раньше сталкивался с этой проблемой. И понял что проще задать TestMeshPro символы которые мне нужны в русском языке. Я задаю 33 заглавные буквы, 33 обычные буквы, 10 цифр, и все знаки препинания, математические и т. д. Практически всегда у меня не находит 2 - 3 символа, но это не существенно.
     
  18. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,168
    Provided the requested characters are present in the source font file, you can always create / assign a dynamic fallback font asset to the primary font asset. See how the LiberationSans SDF and its fallback are setup in the latest version of TMP which is 1.4.1 for Unity 2018.4 and 2.0.1 for Unity 2019.x.
     
  19. LexaMV

    LexaMV

    Joined:
    Feb 20, 2018
    Posts:
    7
    I don’t know about
    TMP 2.0.1 for Unity 2019.x.))))