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
Fix the ugly hack for Chinese display #2297
Comments
Do you think you could submit that as a pull request? They are much easier to review and test than diffs |
ok let me get more comments from the devs from irrlicht first, they say they may need more rewrite see here for details: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=9&t=50938 |
Update! So I think it's better to make stk display chinese/jap/kr properly first, than improvement of irrlicht. I will do pull request later. |
Hi!
I wrote a patch for stk/irrlicht to make it be able wrap line for CJK automatically in #2110 , but there're lots problem discovered later.
Like space between chinese and english get ignored, incorrect linebreak, wrong wrapping position for english with chinese.
Luckily, today I fully solved it by rewriting the print part of statictext, I posted the patch to irrlicht devs before, but getting no response, so I post here to hear comments.
Now stk/irrlicht can handle most utf breaking rules for CJK (can add more in utfwrapping.h) , like no opening brackets at ending line or punctuation mark at starting line.
Here's screenshots:
As u can see, even the most complex combination of english, chinese and brackets, stk/irrlicht can print without wasting too much space *i copy the translation from another msgstr because i don't know how to print that box
As shown in the upper middle box, there's a unneeded newline for chinese, which fixed with the new patch.
Now some questions, is the code good enough? I don't know if I should add a extra .h for defination of
brackets and punctuation. Do u think this should be included in irrlicht trunk too?
Patch: http://pastebin.com/zU7BQL9G
The text was updated successfully, but these errors were encountered: