Tomohiro KUBOTA wrote:
> Also, cursor position at half position of doublewidth character is
> anyway needed. For example, when you need to write "|" at some location
> of X axis from up to down. If a doublewidth character is accidentally
> written there, the vertical line will be broken (if cursor position
> at half position is not allowed).
No, you don't need a cursor at the middle position of a doublewidth character.
There are two use-cases of terminals:
a) The applications which assume a line-oriented display and don't care
about the line width. For these a line-oriented (or paragraph-
oriented) terminal model is suitable. This terminal can decide about
character widths on its own, do bidi and ligatures, possibly use
proportional fonts.
In this case there is no use for "|" for line drawing, or for block
graphics.
b) The applications which assume a cell matrix. Examples: vim 6,
GNU readline, X/Open curses. These applications "know" what is
represented on the screen, and where, because they keep their own
cell matrix.
When such an application wants to put a "|" at position (x, y), it
can do
(gotoxy x-1 y) space space backspace "|"
or
(gotoxy x-1 y) space space (gotoxy x y) "|"
instead of the simplistic
(gotoxy x y) "|"
that you propose.
In neither case you need a cursor being positioned in the middle of a
character.
> If you are thinking about far future, please think a completely different
> system, instead of modifying an existing tty system.
No, the tty system has to be modified where needed.
Looking at the POSIX description of ttys,
http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap11.html
you can see that the canonical model of a tty is a sequence lines containing
characters. It is *not* a rectangular cell grid.
Bruno
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/