zephyrproject-rtos / windows-curses

Windows Curses Python module
https://pypi.org/project/windows-curses/
Other
164 stars 26 forks source link

full-width character #3

Open dhnam opened 5 years ago

dhnam commented 5 years ago

tried

stdscr.addstr(0, 0, "가나다")

result word 가나다 overlapping each other

...And I tested with other full-width character, like full-width English, and same thing happened.

ulfalizer commented 5 years ago

Looking at the Python module code at

https://github.com/zephyrproject-rtos/windows-curses/blob/e7e7a2b33bffa4629fa8cc52bb61d5fad28f5938/py38/_cursesmodule.c#L666

, it just seems to call through to waddstr()/waddwstr() in PDCurses (should get the wide-character waddwstr() in your case, if things are working properly).

I suspect PDCurses does not support full-width characters. It's one of the features listed for this PDCurses fork.

Maybe @wmcbrine (PDCurses author) or @Bill-Gray (fork author) has some input.

wmcbrine commented 5 years ago

Yes, "full-width" characters are something I need to work on.

eyahlin commented 1 year ago

I hope we could still implement this! =)

Bill-Gray commented 1 year ago

For PDCursesMod (the aforementioned fork), the WinGUI and VT ports support full-width characters (and combining characters and SMP characters, i.e., just about everything you can do with Unicode except right-to-left; I'm not even sure how that would be expected to work in Curses). I've thoughts about adding fullwidth support for the framebuffer port, which might later get us support on DOSVGA. Haven't tried it on WinCon (Windows console). I think it may be possible on X11? It may just be a matter of getting the right fonts for that platform.