Skip to content

Text wrapping support for more languages #3450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2017

Conversation

ntrrgc
Copy link
Contributor

@ntrrgc ntrrgc commented Jan 31, 2017

I've modified the regexp in a way that should not modify their behavior in CJK languages but -- hopefully -- finds proper word boundaries in most Latin scripts (Spanish, French, German, Portuguese...) as well as in Greek and Russian.

@pandamicro
Copy link
Contributor

thanks~ Can you provide some texts for testing ?

@ntrrgc
Copy link
Contributor Author

ntrrgc commented Mar 15, 2017

Привіт як в тебе справи

Привіт як в
тебе справи

中文语句中是不包含空格的

中文语句中是
不包含空格的

¿Me preguntas por qué compro arroz y flores? Compro arroz para vivir y flores para tener algo por lo que vivir.

¿Me preguntas por qué
compro arroz y flores?
Compro arroz para vivir
y flores para tener algo
por lo que vivir.

@pandamicro
Copy link
Contributor

Thanks, I will check it out

@Dimon4eg
Copy link
Contributor

Nice!
Would be cool to do the same for cocos2d-x.

@Dimon4eg
Copy link
Contributor

I fixed it also for cocos2d-x.
here is PR cocos2d/cocos2d-x#17703

@pandamicro pandamicro merged commit c901b28 into cocos2d:develop Apr 17, 2017
@pandamicro
Copy link
Contributor

Merged for v3.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants