Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug TextMesh Pro - bug with certain Russian characters

Discussion in 'UGUI & TextMesh Pro' started by matzjj, Aug 18, 2022.

  1. matzjj

    matzjj

    Joined:
    Mar 6, 2018
    Posts:
    9
    I am creating a game that uses several different Languages based on setting. The only language causing problems is Russian. Certain characters look like they are interpreted as a new line character. I have tried 4 Fonts: Liberation, Noto Serif, Noto Sans, and Calibri, with the range of Cyrillic alphabet, and with a range of 00-2FFF, nothing fixes this problem. I have also adjusted settings on the text box as well.

    Here is the text with wordwrap on, on top. and wordwrap off below. The debug log shows the Russian words there were to be displayed.

    russian.jpg

    Select letters are missing on the wordwrap, and the words are lower than they should be. Each word is its own text box.

    Here is one of the many setups for the Font Asset I have tried.
    Untitled.png

    This is the limited set, I also tried doing the larger range.

    Here is it working with another language (Chinese) in the right column.
    tracker.png

    I have 5 Font assets that I am using and only the Russian one is causing a problem. It is not like the Chinese when I was missing a character, where it showed a small square instead.

    If there is a fix, I am missing, please let me know. I am creating a multi-language learning program and this font asset is needed for a couple languages. I also tried it in the first column it does the same thing.

    Any info would be appreciated and thanks for a great product.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Just for testing purposes, create a new dynamic font asset using the LiberationSans.ttf font file included with TMP and let me know if using this new dynamic font asset behaves the same way.

    If it does, please copy / paste the exact text that you are using for testing along with screenshot of the text object inspector where I can see the RectTransform settings along with the Text Component settings.
     
  3. matzjj

    matzjj

    Joined:
    Mar 6, 2018
    Posts:
    9
    That didn't work. Same thing again. Here are the first 30 words. I have about 4000 words in nearly 20 Languages, and another 80 languages ready to add, and only Russian is causing a problem.

    заброшенный
    абсолютный
    академический
    приемлемый
    удавшийся
    точный
    активный
    актуальный
    подросток
    продвинутый
    неблагоприятный
    в возрасте
    в живых
    анимированный
    ожидаемый
    античный
    очевидный
    подходящее
    подходящий
    согласованный
    Спортивное
    прикрепил
    привлекательный
    аутентичный
    уполномоченный
    автоматический
    осведомленный
    голый
    основной

    I can get this alphabet to appear as single letters as Upper case. One of my games, I replace each letter in a word if it is in this alphabet, as a lower case, with an underscore
    а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я
    That seems to work fine, until I replace the original letters again. Then the same thing happens.

    This is 4 fonts and about 10 new font assets I have tried now all with different settings. Nothing seems to work
     
  4. matzjj

    matzjj

    Joined:
    Mar 6, 2018
    Posts:
    9
    Untitled.jpg

    Here are the settings. I am occasionally getting an Invalid AABB in AABB error, but it does not happen as often as the bug I am showing.
     
  5. matzjj

    matzjj

    Joined:
    Mar 6, 2018
    Posts:
    9
    Is this what you were looking for?
     
  6. Gamadrila

    Gamadrila

    Joined:
    Sep 5, 2021
    Posts:
    142
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Basically, I need the steps to be able to reproduce the behavior.

    If you are able to easily reproduce this by creating a new text object, assigning your font asset to it and then setting whatever text that causes the behavior, then this is what I need.

    If this seems to only happen in your project, then please consider submitting a bug report with project and steps to reproduce. If you do submit a bug report please let me know and share the case # as soon as you get it from Unity.
     
  8. matzjj

    matzjj

    Joined:
    Mar 6, 2018
    Posts:
    9
    Not sure why you can't see the screen shots I see every one of them. I posted 3 straight replies.
     
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    It is not the seeing part but being able to reproduce it on my end so I can figure out why this is happening on your end.

    Are you able to reproduce this in a new text object with just the text?

    Could this behavior be caused by some script when you manipulate those strings?

    Your text auto-size range is pretty small 0.1 to 5, do you get the same behavior if this range was larger like 11 to 24 points? This would impact overall scale but curious to see
     
    Last edited: Aug 25, 2022
  10. Chrisdbhr

    Chrisdbhr

    Joined:
    May 21, 2016
    Posts:
    19
    If anyone in the future end up coming to this thread like I did, I managed to fix this issue setting a font setup as dynamic and with a wide range of characters as a Fallback Font Asset.

    This can be setup in the Project Settings, like the image below (I set "OpenSans" as a fallback font):
    upload_2023-10-22_4-12-18.png