许多终端模拟器(xterm、Konsole)支持double-size characters 。 Ncurses 不支持这一点,据我所知,ncurses 不会打印转义字符(\033 将不转义并以明文形式打印)。
是否可以在 ncurses 应用程序中打印双倍大小的字符?
最佳答案
您引用的“双倍大小”字符功能由以下 ANSI 序列设置(找到 here ):
ESC # 3 DEC double-height line, top half (DECDHL), VT100. ESC # 4 DEC double-height line, bottom half (DECDHL), VT100. ESC # 5 DEC single-width line (DECSWL), VT100. ESC # 6 DEC double-width line (DECDWL), VT100.
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"
终端可以在两个单独的行上显示“双倍高度”文本。
据我所知,您是对的 - ncurses 尚未“实现”它们 - 也许是因为它们依赖于最初为 DECTerminals 独有的专用字体集。
言归正传,这似乎不可能,因为 ncurses 没有此功能的属性,尽管我承认找不到任何直接说明它的引用资料不可能的。也许具有疯狂 terminfo 技能的人可以解释为什么是这样(或不是)。
关于terminal - 使用 Ncurses 打印双倍大小的字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3470106/