Search Unity

TMP - Possible to truncate full words?

Discussion in 'UGUI & TextMesh Pro' started by Fu11English, Jul 17, 2021.

  1. Fu11English

    Fu11English

    Joined:
    Feb 27, 2012
    Posts:
    258
    As the title, is it possible to truncate full words. I can only seem to truncate individual letters. Or actually in my case it’s a string of 1 or 2 digit numbers, sometimes the units digits are truncated off the right but the tens digits remain which looks ugly.

    I tried changing the word spacing too but it didn’t really solve it.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Truncate and Ellipsis Overflow Modes either truncate or replace individual characters.

    There is no Overflow modes right now to truncate full words which is something I could consider adding.

    Can you post a few examples of this just so we could get feedback from other users to see if they would find this functionality useful.
     
  3. Fu11English

    Fu11English

    Joined:
    Feb 27, 2012
    Posts:
    258
    I thought it was pretty self explanatory, but here is a piccy!

    Truncation.PNG

    New numbers are added on the left and fall off the right. The 2 on the right is actually another 24. I simply want it to automatically hide the full 'word'.

    ***I have since found that setting the overflow method to Linked (with no link) to give me the desired effect. But I don't know if that is getting a bit hacky?!
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Good catch :) That should indeed provide the desired result and should be fine to us as such.

    P.S. I'll see if I can add a new overflow mode that does the above but without the Link part just to minimize potential confusion.
     
    Fu11English likes this.