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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Text Mesh Pro UGUI renders differently after Unity project porting

Discussion in 'UGUI & TextMesh Pro' started by giggioz, Oct 1, 2020.

  1. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    Hi!

    I had an hard timing trying to figure out what's going on here.

    I upgraded my project from
    2019.2.11f1 (with Text Mesh 2.0.1)
    to
    2020.1.5f1 (with Text Mesh 3.0.1)

    Doing a first test I noticed that the texts are rendered totally wrong.

    Look at the title for example "Tesori e Leggende Italiane" or the bottom button "Non vedo l'ora!"

    I checked:
    The TextMeshPro_UGUI components are the same (with same values in the inspector)
    Font asset info are the same
    TMP_Setting are the same

    Do you have any suggestions for me?
    Thank you

    upload_2020-10-1_18-2-54.png

    VS

    upload_2020-10-1_18-3-5.png
     
  2. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    Update:
    I've found that only the bold and the italic text is wrong.
    I was able to fix the bold changing the value of 'Bold spacing' to a different number but there is not an equivalent setting for the italic. Any idea?

    It's anyway very strange that the text is rendered differently...
     
  3. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Are you using character spacing or normal spacing on your font asset?

    For the longest time, all spacing adjustments such as character, word, line, paragraph, spacing via rich text tags, were inconsistent relative to each other, scale and sampling point size. As such, this was addressed in the latest versions of the TMP package.

    Spacing options in the Inspector are now in 1/100 em where 1em = 1 pixel * point size. Assuming the point size of the text object is 50 then 1em will be 50 pixels.

    Values in rich text tags are now consistent where <cspacing=50px> will be 50 pixels and again if the point size of the text object is 50 point size then <cspacing=1em> will be 1 pixel * 50 or 50 pixels

    The spacing for the styles like Normal or Bold are now also in 1/100 em. In the case of bold style, it would increase the spacing by the given amount which would be calculated the same as in the previous examples.
     
  4. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    All spacing options are at 0

    As I wrote in the Update message above I was able to fix the bold changing Bold Spacing to a new value

    upload_2020-10-2_11-20-44.png

    Now you can see that normal and bold text are ok but still italic does not work (look at the bottom button)

    Here a screenshot of the current results (you can also see the spacing options at 0)

    upload_2020-10-2_11-20-44.png

    If I disable italic I get this, which is ok

    upload_2020-10-2_11-20-44.png

    Changing Italic Style to a different value (from 35 to 25) made this, it’s ok-ish but e and d are very close to each other

    upload_2020-10-2_11-20-44.png

    Still it’s not the same as the original result

    upload_2020-10-2_11-20-44.png

    Italic Style is the only parameter I’ve found related only to the italic…

    The TMP_Font Asset has the same values as the previous project and I also tried to update the atlas texture

    The actual result I would say it’s acceptable so don’t bother too much about this, I just wanted to share with you this issue.

    Still if you have other ideas or comment I’m ready to listen

    Thank you as usual, your support is always awesome.
     
  5. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Check if there is a Glyph Adjustment Pair defined for the "e" and "d".

    I'll try to test this tomorrow using the same font (assuming I can find it) to see what results I get between 2.0.1 and 3.0.1 and let you know what I find / uncover.
     
  6. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    Do you mean Glyph Adjustment Table? It's empty.

    I upload the font for your convenience, thanks.
     

    Attached Files: