Bug: Rich Text wrap by word instead of wrap by char

Bug: Rich Text wrap by word instead of wrap by char
0

#1

Hi everyone, in this moment I have something like a bug with the rich text. The problem is with some characters doesn’t work well, for example:

In the pic you can see the problem in English “we’ll” is a word and Arabic “باستخدام” is a word but both of them are cut by the engine.

PD: I know the rich text support different expressions like “\n”,"
" but in my case I need the automatic wraping because there is too much text.

Thanks.


#2

If anyone have the same problem, I need to change four scripts, more specific the variables “label_lastWordRex” “label_lastEnglish” and “label_firstEnglish” and in there add the neccesary char

CCTextUtils.js: in -> CocosCreator\resources\engine\cocos2d\core\label.
cocos2d-js-min.js: in -> CocosCreator\resources\engine\bin.cache\web-mobile.
cocos2d-js-min.js: in -> CocosCreator\resources\engine\bin.
cocos2d-js-for-preview.js: in ->CocosCreator\resources\engine\bin.