Skip to content
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

[bug] Drawing CJK characters #165

Open
myevan opened this issue Aug 25, 2019 · 2 comments
Open

[bug] Drawing CJK characters #165

myevan opened this issue Aug 25, 2019 · 2 comments
Labels

Comments

@myevan
Copy link
Contributor

myevan commented Aug 25, 2019

rot.js has a bug when drawing CJK characters in node (ok in web)

  1. First bug is rot.js does not support CJK unicode blocks

https://en.wikipedia.org/wiki/Unicode_block

  • 0x1100 ~ 0x11FF (Korean: optional)
  • 0x2E80 ~ 0x9FFF (CJK)
  • 0xA960 ~ 0xA97F (Korean: optional)
  • 0xAC00 ~ 0xD7FF (Korean)
  1. CJK characters are full-width characters, but they are strangely printed in node.
    In english, it's like this: Hello -> Hello or H e l l o (안녕 -> 안녕 or 안 녕 )

node english (ok)
rot js_draw_text_english

node korean (bug)
rot js_draw_text_bug_korean

node japanese (bug)
rot js_draw_text_bug_japanese

  1. rot.js needs special work to draw CJK characters correctly and I tried to fix the bug.

myevan/js-ecs@8bf688b

node korean (fixed)
rot js_draw_text_fixed_korean

node japanese (fixed)
rot js_draw_text_fixed_japanese

web korean (no problem)
rot js_draw_text_fixed_korean_in_web

thanks.

@ondras
Copy link
Owner

ondras commented Aug 26, 2019

Hi @myevan ,

thanks for the report! It would be great if you managed to send a PR, provided you were already able to fix the issue.

@ondras ondras added the bug label Aug 26, 2019
@myevan
Copy link
Contributor Author

myevan commented Aug 27, 2019

hi @ondras,
thank you for your answer. i'm a beginner in javascripting and will need some time for making the PR : )

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

No branches or pull requests

2 participants