From 807e632e6dfa8781510c57f47f5a07290c0ebc27 Mon Sep 17 00:00:00 2001 From: pcg Date: Tue, 24 Feb 2004 22:28:40 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 1 + README.unicode | 24 +++++++++++++++++------- src/main.C | 12 +++++------- src/screen.C | 39 +++++++++++++++++++++------------------ 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/Changes b/Changes index c5ab08c9..a47ec176 100644 --- a/Changes +++ b/Changes @@ -22,6 +22,7 @@ - fixed --enable-xgetdefault, reported by eduard bloch. - added manpage for rxvtc/rxvtd based on the one eduard block contributed. + - use reverse video for normal bold text unless colorBD has been set. - many other minor bugfixes. 1.8 Mon Feb 2 20:09:18 CET 2004 diff --git a/README.unicode b/README.unicode index f7e6f89e..6b005139 100644 --- a/README.unicode +++ b/README.unicode @@ -1,23 +1,25 @@ Sketchy overview of the details: -- gcc-3.x is probably required to compile this release, g++, too, as it - has been re-written in C++. +- gcc-3.x is probably required to compile this release, g++-3.x, too, as it + has been re-written in C++ (and a corresponding version of libstdc++). - the options used in the ./reconf script should work. everything else - might be broken. + might work and might be broken. - wchar_t MUST be UNICODE or ISO-10646-1 on your system, or various things will break down. On GNU/Linux, this is true, on Solaris, this is true only for "@ucs" locales, but you should have plenty of them. - rxvt will use unicode internally, but does input/output in the current - locale. so get a utf-8 terminal, use "LC_CTYPE=en_US.UTF-8 rxvt" or + locale. so to get a utf-8 terminal, use "LC_CTYPE=en_US.UTF-8 rxvt" or equivalent. - you can specify a different locale to be used for your input method using the imLocale ressource or switch, e.g.: LC_CTYPE=ja_JP.UTF-8 rxvt -imlocale ja_JP.EUC-JP +- keyboard input is limited by the selected X locale. + - "-fn" commandline switch and *.font ressource accepts a comma seperated list of fontnames: @@ -28,7 +30,8 @@ Sketchy overview of the details: - the _first_ font in the list selects the cell width/height. All other fonts must be smaller or same sized, or they will be ignored or worse. - xft fonts will automatically be rescaled. + xft fonts will automatically be rescaled, x11-fonts, too, if their + size is not specified in the XLFD. - the fonts will be tried in the order given when searching for a font to display a specific character. if you are e.g. mainly interested in @@ -38,11 +41,18 @@ Sketchy overview of the details: font first (e.g. "9x15bold") and let rxvt sort it out. - xft fonts require gobs of memory and generally are slow. try not to - antialias them ("Font:antialias=false") when possible. Often looks better, - too. + antialias them ("Font:antialias=false") when possible. Often looks + better, too, as they then match other fonts in weight. - src/defaultfont.C lists the fallback fonts that are tried when a character cannot be displayed with the current list of fonts. +- using bold fonts for the bold attribute is not supported by xft + and will not be supported by rxvt-unicode, either, even for normal x11 + fonts. + +- normal bold text will use reverse video unless the colorBD resource has + been set. coloured text will use high-intensity colours for bold. + Marc diff --git a/src/main.C b/src/main.C index bdbde81c..65a3774f 100644 --- a/src/main.C +++ b/src/main.C @@ -741,7 +741,7 @@ rxvt_term::change_font (const char *fontname) { rxvt_fontset *fs = new rxvt_fontset (this); - if (fs && fs->populate (fontname)) + if (fs && fs->populate (fontname ? fontname : "fixed")) { delete TermWin.fontset; TermWin.fontset = fs; @@ -749,8 +749,6 @@ rxvt_term::change_font (const char *fontname) TermWin.fheight = fs->base_font ()->height; TermWin.fbase = fs->base_font ()->ascent; - // TODO: screen needs to be told about new fonts - if (TermWin.parent[0]) { resize_all_windows (0, 0, 0); @@ -780,7 +778,7 @@ rxvt_term::set_title (const char *str) #ifndef SMART_WINDOW_TITLE XStoreName (display->display, TermWin.parent[0], str); #else - char *name; + char *name; if (XFetchName (display->display, TermWin.parent[0], &name) == 0) name = NULL; @@ -797,7 +795,7 @@ rxvt_term::set_iconName (const char *str) #ifndef SMART_WINDOW_TITLE XSetIconName (display->display, TermWin.parent[0], str); #else - char *name; + char *name; if (XGetIconName (display->display, TermWin.parent[0], &name)) name = NULL; @@ -812,8 +810,8 @@ rxvt_term::set_iconName (const char *str) void rxvt_term::set_window_color (int idx, const char *color) { - rxvt_color xcol; - int i; + rxvt_color xcol; + int i; if (color == NULL || *color == '\0') return; diff --git a/src/screen.C b/src/screen.C index e13b47e9..029a91a7 100644 --- a/src/screen.C +++ b/src/screen.C @@ -2116,21 +2116,8 @@ rxvt_term::scr_refresh (unsigned char refresh_type) rend = GET_ATTR (rend); - rvid = !! (rend & RS_RVid); - if (rvid) - { - SWAP_IT (fore, back, int); + rvid = !!(rend & RS_RVid); -#ifndef NO_BOLD_UNDERLINE_REVERSE - if (ISSET_PIXCOLOR (Color_RV) -# ifndef NO_CURSORCOLOR - && !ISSET_PIXCOLOR (Color_cursor) -# endif - ) - back = Color_RV; -#endif - - } #ifdef TEXT_BLINK if (rend & RS_Blink) { @@ -2143,21 +2130,37 @@ rxvt_term::scr_refresh (unsigned char refresh_type) fore = back; } #endif + #ifndef NO_BOLD_UNDERLINE_REVERSE - else if (rend & RS_Bold) + if (rend & RS_Bold && fore == Color_fg) { if (ISSET_PIXCOLOR (Color_BD)) fore = Color_BD; - else if (fore == Color_fg) - fore = Color_White; + else + rvid = !rvid; } - else if (rend & RS_Uline) + + if (rend & RS_Uline) { if (ISSET_PIXCOLOR (Color_UL)) fore = Color_UL; } #endif + if (rvid) + { + SWAP_IT (fore, back, int); + +#ifndef NO_BOLD_UNDERLINE_REVERSE + if (ISSET_PIXCOLOR (Color_RV) +# ifndef NO_CURSORCOLOR + && !ISSET_PIXCOLOR (Color_cursor) +# endif + ) + back = Color_RV; +#endif + } + /* * Actually do the drawing of the string here */ -- 2.34.1