views:

40

answers:

1

Many terminal emulators (xterm, Konsole) support double-size characters. Ncurses does not support this and as far as I know, ncurses will not print escape characters (\033 will be unescaped and printed in clear text).

Is it possible at all to print double-size characters in a ncurses application?

+1  A: 

The "double-size" character capability you refer to is set by the following ANSI sequences (found here):

    ESC # 3   DEC double-height line, top half (DECDHL)
    ESC # 4   DEC double-height line, bottom half (DECDHL)

The \e#3 attribute makes the terminal switch character sets to one which only contains the top-half of each character. Similarly, \e#4 switches to a character set containing the bottom-half. By using these together,

echo -e "\e#3Foo\n\e#4Foo"

the terminal can display a "double-height" text on two separate lines.

As far as I can tell you're right - ncurses hasn't "implemented" them - perhaps because they rely on a specialized fontset originally unique to DECTerminals.

Getting to the point, it doesn't seem possible since ncurses has no attribute for this feature, although I admittedly can't find any reference directly stating that it isn't possible. Perhaps someone with crazy terminfo skills can explain why this is (or isn't) the case.

gamen