Wraping text issue in Japanese | Korean | Chinese

I’m trying to wrap Japanese | Chinese label but its not wrapping properly eg.
キング・オブ・\nキャッシュ - King of Cash ( English Translation )
Showing as - Last symbol is braking in new line which is not correct . So my question is how can i solve it in cocos creator .

Screenshot 2023-07-11 at 1.27.16 PM

I think auto shrink mode is what you need

@pandamicro Actually, that’s the only one case which i had mentioned here.
I’m facing issue with msg like リーダーボードの頂点を極めてキング・オブ・キャッシュになりましょう which is subtile for the above msg.
Because of some restrictions, i can’t change OverFlow mode to Shrink Currently, i’m using Resize_Height method.
Similar kind of issue i was facing for Vietnamese lang because i’m using Cocos-2.4.6 so i made changes in text-utils.js class and added Changes mentioned in this PR

So i’m searching for solutions similar to the above one. Because our app has multilingual support .

__CHINESE_REG: /^[\u4E00-\u9FFF\u3400-\u4DFF]+$/,
__JAPANESE_REG: /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g,

__KOREAN_REG: /^[\u1100-\u11FF]|[\u3130-\u318F]|[\uA960-\uA97F]|[\uAC00-\uD7AF]|[\uD7B0-\uD7FF]+$/,

isUnicodeCJK: function(ch) {
return this.__CHINESE_REG.test(ch) || this.__JAPANESE_REG.test(ch) || this.__KOREAN_REG.test(ch);
}

In text-util.js file, I can see we have added a range of symbols, but I don’t know how “isUnicodeCJK” is actually working . Please guide me in this .

My current Cocos setting Screenshot

Can you make the label width bigger and position it relatively to your UI. As long as the width can contain the longest language setup, then it will be ok.
By the way, you might need to type a direct line change instead of \n in the String box

@pandamicro I can increase width of UI Label but ideally i test it with English language and believe on Text wrap for other languages.
Like, for example below , In Chinese text, you can see one symbol move to new line rather than whole word .
So i'm trying to solve this by moving whole word to new line, not only one symbol or character.
Chinese -
Screenshot 2023-07-11 at 3.16.40 PM

Thai -

Its word dau ( last char moved in new line rather whole word ) same with thang

Oh, I see, I guess it’s the text wrapping regular expression is not adapted to some language, I have to report this for future investigation

@pandamicro Yes. Thanks . Could you please suggest how I can proceed to solve this until the engineering team finds a solution for it. Thanks

For each of the label, you can adjust with manual line changes to better fit the text area.
I know it’s stupid, but otherwise, only a correct text regular expression can solve it