Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Label text wrap and japanese words

Discussion in 'UI Toolkit' started by vejab, Nov 13, 2023.

  1. vejab

    vejab

    Joined:
    Dec 21, 2021
    Posts:
    112
    If I create a label with the text "The word こんにちは means hello" and I use text wrap, the Japanese word can be cut in half. What I do is I surround them with <nobr> </nobr> to prevent this behavior. But is there a better way?

    unityjap.png

    In Japanese, there is no space between words so what is usually done, is to add zero-width-space between words so that the computer know when it can break line
     
  2. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    476
    Hello @vejab, thank you for raising this issue!

    We are indeed planning to support breakpoints using Zero Width Space (ZWSP) and have taken note of this for future updates. For now, using <nobr> tags is your best option.
     
    karl_jones and vejab like this.