[PATCH v2 1/3] Handle CJK wide glyph rendering

Peng Wu peng.e.wu at gmail.com
Tue Jul 23 00:49:37 PDT 2013


Hi,

On Tue, 2013-07-23 at 09:22 +0200, David Herrmann wrote:
> Please first address the issues I mentioned in v1. You cannot just
> redraw characters and be fine. That's not how it works. You need to
> adjust handle_char() to move the cursor two columns for
> wide-characters.
> 
Actually I also adjusted the cursor positioning and drawing in v2 patch
set.

[PATCH v2 2/3] Fixes cursor rendering for wide glyphs

Show the cursor at the right position, and use wide cursor under wide
glyph.

> Imagine MODE_AUTOWRAP is set and you draw 10 wide-characters on a 10
> cell-line. We expect a vt320-compat terminal to draw 5 chars on the
> first line and the other 5 chars on the next line.
> 
> Assume MODE_AUTOWRAP not set and you draw 10 wide-characters on a 10
> cell-line. We expect the first 4 chars on the line and the last char
> to be the last character written.
> 
I plan to skip to support MODE_AUTOWRAP feature.

> Really, multi-width characters isn't about drawing. It's about
> correctly interpreting the incoming characters in your vt100-like
> state-machine. Why do you want to support that in terminal.c anyway?
> It's an example, it misses support for a lot of things and I recommend
> avoiding adding complex features.
> 
Because we want weston terminal has i18n support, such as CJK glyph
display.

> Anyhow, here is an example how to move the cursor for multi-width
> characters:
>   https://github.com/dvdhrm/kmscon/blob/master/src/tsm_screen.c#L1000

Best regards,
  Peng Wu



More information about the wayland-devel mailing list