Search Unity

TextMesh Pro How do I keep TextMesh Pro from breaking Korean lines in the middle of words?

Discussion in 'UGUI & TextMesh Pro' started by v-ercart, May 21, 2019.

  1. v-ercart

    v-ercart

    Joined:
    Apr 25, 2018
    Posts:
    8
    Unlike Japanese and Chinese, Korean words are composed of multiple characters and separated from other words by spaces.

    I'm using TMP 1.4.0 and when my Korean words run off the end of the line, they split in the middle of the word.

    It's like English splitting som
    thing like this.

    This Unity bug calls out the problem, but Sarunas says this is by design:
    https://fogbugz.unity3d.com/default.asp?1154192_emr52q7a6qefnvbm

    But that's not correct Korean grammar, so it seems like... definitely not a good design. Sarunas says that I can somehow use the LineBreaking Follow Characters and LineBreaking Leading Characters to control this. Is Sarunas implying that I should add the entire Korean alphabet to one of those files? Will that not cause strange side effects?

    Is there a better way to tell TMP to not split Korean text in the middle of words?
     
  2. mcdanner

    mcdanner

    Joined:
    Jun 17, 2013
    Posts:
    2
    @v-ercart Was a solution ever found for this? We're experiencing the same issue with the latest version of TMP. Thanks.
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Latest release which is version 1.5.0-preview.1 includes an option in the TMP Settings to use Modern Line Breaking for Korean.

    Preview.2 will be available tomorrow unless I run into some major issue.
     
    Mauri likes this.
  4. mcdanner

    mcdanner

    Joined:
    Jun 17, 2013
    Posts:
    2
    @Stephan_B Thanks so much for the quick reply. In the meantime, we've added the Korean characters used by the game to the LineBreaking Leading Characters file. It seems to fix the issue for us, but do you foresee any unintended side effects with this approach? Thanks again.
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There are unintended issues in preview.1 when using text auto-sizing with Japanese or Chinese text but this has been resolved in Preview 2 which will be out tomorrow.
     
  6. duplexius

    duplexius

    Joined:
    Apr 24, 2015
    Posts:
    44
    Hey Stephan,
    our Korean translator also mentioned the word wrapping. We were on Version 1.4.1 so far and are very close to release. Do you think 1.5 preview 10 is stable enough to update to it this late?

    Thanks!
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Best way to find out is for you to give it a spin for testing and let me know if you run into any unforeseen issue.

    I did make some additional improvements to CJK line breaking handling in Preview 10. I also added in a previous release the "Use Modern Line Breaking" for Korean in the TMP Settings which will break using spaces.