diff options
Diffstat (limited to 'src/fe-common/core/formats.c')
-rw-r--r-- | src/fe-common/core/formats.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index 770caaa1..375b00eb 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -207,6 +207,11 @@ int format_expand_styles(GString *out, const char **format, int *flags) g_string_append_c(out, 4); g_string_append_c(out, FORMAT_STYLE_REVERSE); break; + case 'I': + /* italic */ + g_string_append_c(out, 4); + g_string_append_c(out, FORMAT_STYLE_ITALIC); + break; case ':': /* Newline */ g_string_append_c(out, '\n'); @@ -913,6 +918,14 @@ static const char *get_ansi_color(THEME_REC *theme, const char *str, /* normal */ flags &= ~GUI_PRINT_FLAG_BOLD; break; + case 3: + /* italic */ + flags |= GUI_PRINT_FLAG_ITALIC; + break; + case 23: + /* not italic */ + flags &= ~GUI_PRINT_FLAG_ITALIC; + break; case 4: /* underline */ flags |= GUI_PRINT_FLAG_UNDERLINE; @@ -1085,7 +1098,7 @@ static void get_mirc_color(const char **str, int *fg_ret, int *bg_ret) #define IS_COLOR_CODE(c) \ ((c) == 2 || (c) == 3 || (c) == 4 || (c) == 6 || (c) == 7 || \ - (c) == 15 || (c) == 22 || (c) == 27 || (c) == 31) + (c) == 15 || (c) == 22 || (c) == 27 || (c) == 29 || (c) == 31) /* Return how many characters in `str' must be skipped before `len' characters of text is skipped. */ @@ -1282,6 +1295,9 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text) case FORMAT_STYLE_REVERSE: flags ^= GUI_PRINT_FLAG_REVERSE; break; + case FORMAT_STYLE_ITALIC: + flags ^= GUI_PRINT_FLAG_ITALIC; + break; case FORMAT_STYLE_MONOSPACE: flags ^= GUI_PRINT_FLAG_MONOSPACE; break; @@ -1356,6 +1372,11 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text) if (!hide_text_style) flags ^= GUI_PRINT_FLAG_REVERSE; break; + case 29: + /* italic */ + if (!hide_text_style) + flags ^= GUI_PRINT_FLAG_ITALIC; + break; case 31: /* underline */ if (!hide_text_style) |