Search Unity

TextMesh Pro Units of Spacing Options in Inspector

Discussion in 'UGUI & TextMesh Pro' started by unity_l9qK46KFod-YXg, Oct 3, 2019.

  1. unity_l9qK46KFod-YXg

    unity_l9qK46KFod-YXg

    Joined:
    May 2, 2019
    Posts:
    3
    What units are used in the "Spacing Options" that appear in Inspector on the TextMeshPro UGUI script?

    If I set the Character option in Spacing Options to 100, what does that correspond to for a cspace tag?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The spacing options are 1/100 em. Therefore, if the text object point size was 100 and you set the character spacing to 100 (which would be 1em) then the spacing between characters would be increased by 100 pixels.

    This is now the same for cspace tag where using something like <cspace=1em> would yield the same results.

    In the latest release, 1.5.0 and 2.1.0, I also updated the tooltips on the spacing options.
     
    unity_l9qK46KFod-YXg likes this.
  3. unity_l9qK46KFod-YXg

    unity_l9qK46KFod-YXg

    Joined:
    May 2, 2019
    Posts:
    3
    Thanks so much for the quick response. In 2.0.1, they don't appear to be consistent. If I scale up the font size, the relative spacing between characters appears to stay the same when setting a character spacing in inspector, as you'd expect if it's in em. When setting a cspace tag, they get relatively closer. cspace=1em also never seems to match character spacing of 100.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Please test using the latest release which is 2.1.0-preview.1 for Unity 2019.x.
     
    unity_l9qK46KFod-YXg likes this.