Search Unity

Letter Spacing Broken In Text Mesh Pro

Discussion in 'UGUI & TextMesh Pro' started by cuddlepunk, Jun 5, 2019.

  1. cuddlepunk

    cuddlepunk

    Joined:
    Apr 9, 2014
    Posts:
    18
    Hello,

    I'm currently designing a custom text editor with Text Mesh Pro, and discovered that custom letter spacing possibly seems to break when the first letter in a line is a space. The following is how the script writes the text to be interpreted by Text Mesh Pro, and the image shows it really appears - notice how the spacing between i and n is super close?

    I was simply wondering whether anyone may have a solution?

    Code (CSharp):
    1. "<line-height=110%><size=25>A</size> short sentence constructed to demonstrate the bug i<cspace=-0.25em>n<color=#868686><size=16>|</size></color> </cspace>question"
    Untitled-1.png
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I was able to reproduce the issue and have addressed it.

    This will be fixed in the next release of the TMP package which will be version 1.4.2 for Unity 2018.4 and 2.0.2 for Unity 2019.x.

    upload_2019-6-5_15-58-14.png
     
    Last edited: Jun 5, 2019
  3. cuddlepunk

    cuddlepunk

    Joined:
    Apr 9, 2014
    Posts:
    18
    Thanks so much for looking into it, and for producing such a swift fix - this is so lovely to hear!