ncurses是否支持斜体? [英] ncurses support for italics?
问题描述
某些终端(例如urxvt)通过sitm
和ritm
terminfo条目支持以斜体显示文本:
echo `tput sitm`italics`tput ritm`
我想在我想要将真实的斜体显示到控制台的应用程序中使用它.不幸的是,该应用程序是基于ncurses的,并且ncurses似乎没有斜体的属性---它包含了很多内容,包括不可见的文本(我相信对某些东西有用),但是没有斜体.>
是否有人知道一种方法来诱使ncurses显示斜体文本,还是我不得不抛弃ncurses并重写程序以使用原始终端序列?
看起来ncurses 5.10将包含A_ITALIC
.更改于2013年9月31日生效:
http://invisible-island.net/ncurses/NEWS-contents. html#t20130831
pdcurses也支持A_ITALIC
,因此至少对兼容性有一个模糊的点头.不幸的是,这在5.10发布并广泛传播之前对我没有多大帮助.
Some terminals, such as urxvt, support display text in italics via the sitm
and ritm
terminfo entries:
echo `tput sitm`italics`tput ritm`
I'd like to use this in an application I've got which wants to render real italics into the console. Unfortunately the application is ncurses-based, and ncurses doesn't seem to have a attribute for italics --- it's got a whole bunch, including invisible text (which I'm sure is useful for something), but no italics.
Does anyone know of a way to trick ncurses into displaying italic text, or am I going to have to ditch ncurses and rewrite the program to use raw terminal sequences?
It looks like ncurses 5.10 will contain A_ITALIC
. The change went in on September 31 2013:
http://invisible-island.net/ncurses/NEWS-contents.html#t20130831
pdcurses supports A_ITALIC
as well so there's at least a vague nod to compatibility. Unfortunately, this won't help me much until 5.10 is released and then becomes widespread...
这篇关于ncurses是否支持斜体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!