ncurses是否支持斜体? [英] ncurses support for italics?

查看:83
本文介绍了ncurses是否支持斜体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

某些终端(例如urxvt)通过sitmritm 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆