How to break Chinese / Japanese text?

Hi for gui text node, the line break only happen when there is space character. The problem is in Chinese / Japanese is not using space character.

Is there anyway to make the line break on any character? Like in HTML / CSS there is: white-space: break-all option.

try this extension

Of course there is by code:

label.set_text(“#label”, “large_string_inside_”..“\nmy_div_is_not_working_”..“\nconsistently_in_firefox.”)

Adjust the pivot using the node properties!

image

1 Like

I use defold-rich-text extension to make a Chinese example for you.

break_chinese_text.zip (5.3 MB)

3 Likes

Related thread, I had this issue in the past

1 Like