Ticket #3065: support of italic text.

Italic text is supported by S-Lang since pre2.3.0-107 and NCurses since 5.9.20130831.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Egmont Koblinger 2015-02-17 15:22:53 +03:00 committed by Andrew Borodin
parent 45d135d768
commit 89d2db5ca3
8 changed files with 33 additions and 21 deletions

View File

@ -61,6 +61,7 @@ Antonio Palama, DOS port <palama@posso.dm.unipi.it>
Egmont Koblinger <egmont@gmail.com> Egmont Koblinger <egmont@gmail.com>
Support of 256 colors Support of 256 colors
Support of italic text
Support of extended mouse clicks beyond 223 column Support of extended mouse clicks beyond 223 column
Support of bracketed paste mode of xterm Support of bracketed paste mode of xterm
(http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Bracketed%20Paste%20Mode) (http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Bracketed%20Paste%20Mode)

View File

@ -3609,7 +3609,7 @@ color16 to color255, or as rgb000 to rgb555 and gray0 to gray23. Example:
base_color=normal=white,default:marked=magenta,default base_color=normal=white,default:marked=magenta,default
.fi .fi
.PP .PP
Attributes can be any of bold, underline, reverse and blink, appended by a Attributes can be any of bold, italic, underline, reverse and blink, appended by a
plus sign if more than one are desired. The special word "none" means no plus sign if more than one are desired. The special word "none" means no
attributes, without attempting to fall back to base_color. Example: attributes, without attempting to fall back to base_color. Example:
.PP .PP

View File

@ -439,7 +439,7 @@ uses the color before the slash. See cooledit(1) for supported
.B cooledit .B cooledit
colors. colors.
.PP .PP
Attributes can be any of bold, underline, reverse and blink, appended by a Attributes can be any of bold, italic, underline, reverse and blink, appended by a
plus sign if more than one are desired. plus sign if more than one are desired.
.PP .PP
Comments may be put on a separate line starting with the hash sign (#). Comments may be put on a separate line starting with the hash sign (#).

View File

@ -3999,7 +3999,7 @@ lightgray и white. Для прозрачного фона используют
base_color=normal=white,default:marked=magenta,default base_color=normal=white,default:marked=magenta,default
.fi .fi
.PP .PP
Атрибуты обозначаются словами "bold", "underline", "reverse" и "blink". Атрибуты обозначаются словами "bold", "italic", "underline", "reverse" и "blink".
Чтобы использовать несколько атрибутов, их надо перечислить через символ "+". Чтобы использовать несколько атрибутов, их надо перечислить через символ "+".
The special word "none" menas no attributes, without attempting to fall back The special word "none" menas no attributes, without attempting to fall back
to base_color. Пример: to base_color. Пример:

View File

@ -83,6 +83,9 @@ mc_tty_color_table_t const color_table[] = {
mc_tty_color_table_t const attributes_table[] = { mc_tty_color_table_t const attributes_table[] = {
{"bold", A_BOLD}, {"bold", A_BOLD},
#ifdef A_ITALIC /* available since ncurses-5.9-20130831 / slang-pre2.3.0-107 */
{"italic", A_ITALIC},
#endif /* A_ITALIC */
{"underline", A_UNDERLINE}, {"underline", A_UNDERLINE},
{"reverse", A_REVERSE}, {"reverse", A_REVERSE},
{"blink", A_BLINK}, {"blink", A_BLINK},

View File

@ -11,12 +11,17 @@
/*** typedefs(not structures) and defined constants **********************************************/ /*** typedefs(not structures) and defined constants **********************************************/
/* When using Slang with color, we have all the indexes free but /* When using Slang with color, we have all the indexes free but
* those defined here (A_BOLD, A_UNDERLINE, A_REVERSE, A_BLINK) * those defined here (A_BOLD, A_ITALIC, A_UNDERLINE, A_REVERSE, A_BLINK)
*/ */
#ifndef A_BOLD #ifndef A_BOLD
#define A_BOLD SLTT_BOLD_MASK #define A_BOLD SLTT_BOLD_MASK
#endif /* A_BOLD */ #endif /* A_BOLD */
#ifdef SLTT_ITALIC_MASK /* available since slang-pre2.3.0-107 */
#ifndef A_ITALIC
#define A_ITALIC SLTT_ITALIC_MASK
#endif /* A_ITALIC */
#endif /* SLTT_ITALIC_MASK */
#ifndef A_UNDERLINE #ifndef A_UNDERLINE
#define A_UNDERLINE SLTT_ULINE_MASK #define A_UNDERLINE SLTT_ULINE_MASK
#endif /* A_UNDERLINE */ #endif /* A_UNDERLINE */

View File

@ -47,9 +47,12 @@
# #
# Following the foreground and background colors, the third (optional) value # Following the foreground and background colors, the third (optional) value
# can specify special attributes to enable. Valid values are bold, underline, # can specify special attributes to enable. Valid values are bold, underline,
# reverse and blink. Append more with a plus sign, e.g. "underline+bold". # italic, reverse and blink. Append more with a plus sign, e.g. "bold+italic".
# Leaving the field empty makes it fall back to the attributes of _default_. # Leaving the field empty makes it fall back to the attributes of _default_.
# Use any other word (e.g. "none") to prevent fallback and disable all flags. # Use any other word (e.g. "none") to prevent fallback and disable all flags.
#
# Italic support requires a recent enough ncurses (>= 5.9.20130831) or slang
# (>= 2.3). All attributes are subject to support by the terminal emulator.
[skin] [skin]
description = Sand skin using 256 colors description = Sand skin using 256 colors
@ -81,8 +84,8 @@
[core] [core]
_default_ = black;rgb554 _default_ = black;rgb554
selected = ;rgb452 selected = ;rgb452
marked = rgb400 marked = rgb400;;italic
markselect = rgb400;rgb452 markselect = rgb400;rgb452;italic
gauge = ;rgb452 gauge = ;rgb452
input = ;rgb452 input = ;rgb452
inputunchanged = gray;rgb452 inputunchanged = gray;rgb452
@ -90,14 +93,14 @@
disabled = gray;rgb553 disabled = gray;rgb553
reverse = ;rgb452 reverse = ;rgb452
commandlinemark = white;gray commandlinemark = white;gray
header = red header = red;;italic
[dialog] [dialog]
_default_ = black;rgb553 _default_ = black;rgb553
dfocus = ;rgb452 dfocus = ;rgb452
dhotnormal = ;;underline dhotnormal = ;;underline
dhotfocus = ;rgb452;underline dhotfocus = ;rgb452;underline
dtitle = ;;underline dtitle = ;;italic+underline
[error] [error]
_default_ = rgb554;rgb320;bold _default_ = rgb554;rgb320;bold
@ -105,7 +108,7 @@
errdfocus = rgb000;rgb452;bold errdfocus = rgb000;rgb452;bold
errdhotnormal = ;;bold+underline errdhotnormal = ;;bold+underline
errdhotfocus = rgb000;rgb452;bold+underline errdhotfocus = rgb000;rgb452;bold+underline
errdtitle = ;;bold+underline errdtitle = ;;bold+italic+underline
[filehighlight] [filehighlight]
directory = directory =
@ -126,28 +129,28 @@
database = rgb421 database = rgb421
[menu] [menu]
_default_ = black;rgb452 _default_ = black;rgb452;italic
menusel = ;rgb551 menusel = ;rgb551
menuhot = ;;underline menuhot = ;;italic+underline
menuhotsel = ;rgb551;underline menuhotsel = ;rgb551;italic+underline
menuinactive = menuinactive =
[popupmenu] [popupmenu]
_default_ = black;rgb553 _default_ = black;rgb553
menusel = ;rgb452;underline menusel = ;rgb452;underline
menutitle = ;;underline menutitle = ;;italic+underline
[buttonbar] [buttonbar]
hotkey = black;rgb554 hotkey = black;rgb554;italic
button = black;rgb452 button = black;rgb452;italic
[statusbar] [statusbar]
_default_ = black;rgb452 _default_ = black;rgb452;italic
[help] [help]
_default_ = black;rgb553 _default_ = black;rgb553
helpitalic = green helpitalic = green;;italic
helpbold = red helpbold = red;;bold
helplink = blue;;underline helplink = blue;;underline
helpslink = blue;;reverse helpslink = blue;;reverse
helptitle = ;;underline helptitle = ;;underline
@ -155,7 +158,7 @@
[editor] [editor]
_default_ = black;rgb554 _default_ = black;rgb554
editbold = rgb400 editbold = rgb400
editmarked = ;rgb452 editmarked = ;rgb452;italic
editwhitespace = rgb400;rgb553 editwhitespace = rgb400;rgb553
editlinestate = ;rgb553 editlinestate = ;rgb553
bookmark = ;rgb551 bookmark = ;rgb551

View File

@ -369,7 +369,7 @@ mc_args_new_color_group (void)
"Extended colors, when 256 colors are available:\n" "Extended colors, when 256 colors are available:\n"
" color16 to color255, or rgb000 to rgb555 and gray0 to gray23\n\n" " color16 to color255, or rgb000 to rgb555 and gray0 to gray23\n\n"
"Attributes:\n" "Attributes:\n"
" bold, underline, reverse, blink; append more with '+'\n") " bold, italic, underline, reverse, blink; append more with '+'\n")
); );
/* *INDENT-ON* */ /* *INDENT-ON* */