[PATCH v2 1/3] Handle CJK wide glyph rendering
Bill Spitzak
spitzak at gmail.com
Wed Jul 17 09:53:43 PDT 2013
The wcwidth is necessary to make the terminal and the curses library
agree and should only be used to interpret how to turn the incoming data
into a resulting display. After that you have the glyphs you want to
draw on the screen and you should use that to figure out where to draw
underscores and cursors.
I recommend a new fix that uses the width of the same string being drawn
to place the underscore and cursor, so it will always line up whether or
not the font is one of the (nonexistent) set that actually agrees with
wcwidth, and will work with proportionally spaced fonts. For a demo
client I would skip trying to interpret wcwidth on incoming text, just
act like each glyph takes one character cell.
Peng Wu wrote:
> Some CJK glyphs are wide, which occupy two columns.
> If the glyph is wide, then use two columns instead of one.
More information about the wayland-devel
mailing list