Search Unity

TextMesh Pro AutoSize and width adjustment with spaces

Discussion in 'UGUI & TextMesh Pro' started by NolwennB, Dec 5, 2018.

  1. NolwennB

    NolwennB

    Joined:
    Mar 4, 2014
    Posts:
    15
    Hello,
    I'm trying to use the AutoSize option with Width set to 50% on a TextMeshProUGUI, to shrink my text in width first, rather than lowering the font size. It works fine if I don't have any space in my text, but it doesn't work at all if I put a space in the middle of my text : the result is the same that if width is set to 0%. Can you help me on this ?
    Thanks
    Unity 2018.2.8f1
    TMP 1.3.0
     
  2. NolwennB

    NolwennB

    Joined:
    Mar 4, 2014
    Posts:
    15
    Same issue with a - instead of a space.
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Can you provide me with a example of the raw text you are using and settings in the inspector on that text object?

    Please provide the string of text and image of the inspector values. This will make it easier for me to reproduce on my end.
     
  4. NolwennB

    NolwennB

    Joined:
    Mar 4, 2014
    Posts:
    15
    Sure, here it is :
    upload_2018-12-6_14-4-55.png

    upload_2018-12-6_14-6-16.png
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for provide the additional information.

    I was able to reproduce the behavior and now looking for a clean way to address this.

    Will provide an update as soon as I have more information.
     
  6. NolwennB

    NolwennB

    Joined:
    Mar 4, 2014
    Posts:
    15
    Hello Stephan,
    Did you find a solution for this issue ?
    Thank you.
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I did look into it and it will be tricky to alter the behavior. I'll take another look at this mid week.