bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doubled backspaces for bold/underline with CJK in no-SGR mode


From: Werner LEMBERG
Subject: Re: doubled backspaces for bold/underline with CJK in no-SGR mode
Date: Sat, 15 Jan 2011 11:24:04 +0100 (CET)

>       * src/devices/grotty/tty.cpp (tty_printer::make_underline): Only
>       emit a single backspace in no-SGR mode.  less (at least) backspaces
>       over a character at a time.
>       (tty_printer::make_bold): Likewise.
> 
> === modified file 'src/devices/grotty/tty.cpp'
> --- src/devices/grotty/tty.cpp        2010-12-13 17:42:28 +0000
> +++ src/devices/grotty/tty.cpp        2011-01-09 15:17:24 +0000
> @@ -311,11 +311,8 @@ void tty_printer::make_underline(int w)
>      if (!w)
>        warning("can't underline zero-width character");
>      else {
> -      int n = w / font::hor;
> -      for (int i = 0; i < n; i++)
> -     putchar('_');
> -      for (int j = 0; j < n; j++)
> -     putchar('\b');
> +      putchar('_');
> +      putchar('\b');

I wonder whether we shall use your new code only if `font::is_unicode'
is set.  There must have been a reason why James Clark has coded it
that way, and probably such old terminals (or terminal emulations) are
still somewhere in use.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]