From 806b5aa56d9578ac486f84f6dc2a1cefbec40ab4 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Jul 2004 14:57:11 +0000 Subject: [PATCH] *** empty log message *** --- doc/rxvt.1 | 82 ++++++++++++++++++++++++-------------- doc/rxvt.tbl | 82 ++++++++++++++++++++++++-------------- doc/yodl/rxvt-options.yo | 21 +++++++--- doc/yodl/rxvt-resources.yo | 25 +++++++++--- doc/yodl/versioninfo.yo | 6 +-- src/defaultfont.C | 14 ++++++- src/defaultfont.h | 2 +- src/rxvtlib.h.in | 2 +- src/screen.C | 65 ++++++++++++++++-------------- src/xdefaults.C | 1 + 10 files changed, 190 insertions(+), 110 deletions(-) diff --git a/doc/rxvt.1 b/doc/rxvt.1 index 3b0c772e..330c12f1 100644 --- a/doc/rxvt.1 +++ b/doc/rxvt.1 @@ -1,13 +1,13 @@ .if !\n(.g .ab GNU tbl requires GNU troff. .if !dTS .ds TS .if !dTE .ds TE -.TH "RXVT" "1" "2004-05-10" "X Version 11" "X Tools" +.TH "RXVT" "1" "2004-06-26" "X Version 11" "X Tools" .SH "NAME" rxvt-unicode (ouR XVT, unicode) \- a VT102 emulator for the X window system .PP .SH "SYNOPSIS" .PP -\fBrxvt\fP [options] [-e command [ args ]] +\fBurxvt\fP [options] [-e command [ args ]] .PP .SH "DESCRIPTION" .PP @@ -20,7 +20,7 @@ advantage on a machine serving many X sessions\&. .PP .SH "OPTIONS" .PP -The \fBrxvt\fP options (mostly a subset of \fIxterm\fP\&'s) are listed below\&. +The \fBurxvt\fP options (mostly a subset of \fIxterm\fP\&'s) are listed below\&. In keeping with the smaller-is-better philosophy, options may be eliminated or default values chosen at compile-time, so options and defaults listed may not accurately reflect the version installed on your system\&. @@ -30,7 +30,7 @@ dependent upon\&. e\&.g\&. `Compile \fIXIM\fP:\&' requires \fIXIM\fP on the \fI line\&. Note: `rxvt -help\&' gives a list of all command-line options compiled into your version\&. .PP -Note that \fBrxvt\fP permits the resource name to be used as a long-option +Note that \fBurxvt\fP permits the resource name to be used as a long-option (--/++ option) so the potential command-line options are far greater than those listed\&. For example: `rxvt --loginShell --color1 Orange\&'\&. @@ -83,12 +83,21 @@ resource \fBpointerColor2\fP\&. The colour of the border between the xterm scrollbar and the text; resource \fBborderColor\fP\&. .IP "\fB-fn\fP \fIfontname\fP" -Select the fonts to be used used\&. This is a comma seperated -list of font names that are used in turn when trying to display -unicode characters\&. The first font defines the cell size for characters, -other fonts might be smaller, but not larger\&. A reasonable default font list -is always appended to it\&. +Select the fonts to be used\&. +This is a comma seperated list of font names that are used in turn when +trying to display Unicode characters\&. +The first font defines the cell size for characters; other fonts might +be smaller, but not larger\&. +A reasonable default font list is always appended to it\&. resource \fBfont\fP\&. +.IP "\fB-rb\fP|\fB+rb\fP" +Enable "real bold" support\&. +When this option is on, bold text will be displayed using the first +available bold font in the font list\&. +Bold fonts should thus be specified in the font list after their +corresponding regular fonts\&. +If no bold font can be found, a regular font will be used\&. +resource \fBrealBold\fP\&. .IP "\fB-name\fP \fIname\fP" Specify the application name under which resources are to be obtained, rather than the default executable file name\&. @@ -149,7 +158,7 @@ This option specifies the name of the terminal type to be set in the \fItermcap(5)\fP database and should have \fIli#\fP and \fIco#\fP entries; resource \fBtermName\fP\&. .IP "\fB-e\fP \fIcommand [arguments]\fP" -Run the command with its command-line arguments in the \fBrxvt\fP +Run the command with its command-line arguments in the \fBurxvt\fP window; also sets the window title and icon name to be the basename of the program being executed if neither \fI-title\fP (\fI-T\fP) nor \fI-n\fP are given on the command line\&. If this option is used, it @@ -203,15 +212,15 @@ in some window managers\&. Note: `rxvt --help\&' gives a list of all resources (long options) compiled into your version\&. If compiled with internal Xresources support (i\&.e\&. \fBrxvt -h\fP lists -\fB\&.Xdefaults\fP) then \fBrxvt\fP accepts application defaults set in +\fB\&.Xdefaults\fP) then \fBurxvt\fP accepts application defaults set in XAPPLOADDIR/Rxvt (compile-time defined: usually \fB/usr/lib/X11/app-defaults/Rxvt\fP) and resources set in \fB~/\&.Xdefaults\fP, or \fB~/\&.Xresources\fP if \fB~/\&.Xdefaults\fP does not exist\&. Note that when -reading X resources, \fBrxvt\fP recognizes two class names: \fBXTerm\fP and +reading X resources, \fBurxvt\fP recognizes two class names: \fBXTerm\fP and \fBRxvt\fP\&. The class name \fBXTerm\fP allows resources common to both -\fBrxvt\fP and \fIxterm\fP to be easily configured, while the class name -\fBRxvt\fP allows resources unique to \fBrxvt\fP, notably colours and -key-handling, to be shared between different \fBrxvt\fP configurations\&. +\fBurxvt\fP and \fIxterm\fP to be easily configured, while the class name +\fBRxvt\fP allows resources unique to \fBurxvt\fP, notably colours and +key-handling, to be shared between different \fBurxvt\fP configurations\&. If no resources are specified, suitable defaults will be used\&. Command-line arguments can be used to override resource settings\&. The following resources are allowed: @@ -239,6 +248,7 @@ but the actual colour names used are listed in the .IP "\fBcolorBD:\fP \fIcolour\fP" Use the specified colour to display bold characters when the foreground colour is the default\&. +This option will be ignored if \fBrealBold\fP is enabled\&. .IP "\fBcolorUL:\fP \fIcolour\fP" Use the specified colour to display underlined characters when the foreground colour is the default\&. @@ -295,18 +305,30 @@ Specify the colon-delimited search path for finding files (XPM and menus), in addition to the paths specified by the \fBRXVTPATH\fP and \fBPATH\fP environment variables\&. .IP "\fBfont:\fP \fIfontname\fP" -Select the fonts to be used used\&. This is a comma seperated -list of font names that are used in turn when trying to display -unicode characters\&. The first font defines the cell size for characters, -other fonts might be smaller, but not larger\&. A reasonable default font list -is always appended to this list\&. +Select the fonts to be used\&. +This is a comma seperated list of font names that are used in turn when +trying to display Unicode characters\&. +The first font defines the cell size for characters; other fonts might +be smaller, but not larger\&. +A reasonable default font list is always appended to it\&. option \fB-fn\fP\&. +.IP "\fBrealBold:\fP \fIboolean\fP" +\fBTrue\fP: Enable "real bold" support\&. +When this option is on, bold text will be displayed using the first +available bold font in the font list\&. +Bold fonts should thus be specified in the font list after their +corresponding regular fonts\&. +If no bold font can be found, a regular font will be used\&. +option \fB-rb\fP\&. +\fBFalse\fP: Display bold text in a regular font, using the color +specified with \fBcolorBD\fP; +option \fB+rb\fP\&. .IP "\fBselectstyle:\fP \fImode\fP" Set mouse selection style to \fBold\fP which is 2\&.20, \fBoldword\fP which is xterm style with 2\&.20 old word selection, or anything else which gives xterm style selection\&. .IP "\fBscrollstyle:\fP \fImode\fP" -Set scrollbar style to \fBrxvt\fP, \fBrxvt\fP, \fBplain\fP, \fBnext\fP or \fBxterm\fP +Set scrollbar style to \fBurxvt\fP, \fBrxvt\fP, \fBplain\fP, \fBnext\fP or \fBxterm\fP .IP "\fBtitle:\fP \fIstring\fP" Set window title string, the default title is the command-line specified after the \fB-e\fP option, if any, otherwise the application @@ -487,9 +509,9 @@ intervening resource name \fBkeysym\&.\fP cannot be omitted\&. This resource is only available when compiled with KEYSYM_RESOURCE\&. .SH "THE SCROLLBAR" .PP -Lines of text that scroll off the top of the \fBrxvt\fP window (resource: +Lines of text that scroll off the top of the \fBurxvt\fP window (resource: \fBsaveLines\fP) and can be scrolled back using the scrollbar or by keystrokes\&. -The normal \fBrxvt\fP scrollbar has arrows and its behaviour is fairly +The normal \fBurxvt\fP scrollbar has arrows and its behaviour is fairly intuitive\&. The \fBxterm-scrollbar\fP is without arrows and its behaviour mimics that of \fIxterm\fP .PP @@ -520,7 +542,7 @@ Left double-click to select a word; Left triple-click to select the entire line\&. .IP "\fBInsertion\fP:" Pressing and releasing the Middle mouse button (or \fBShift-Insert\fP) -in an \fBrxvt\fP window causes the current text selection to be inserted +in an \fBurxvt\fP window causes the current text selection to be inserted as if it had been typed on the keyboard\&. .SH "CHANGING FONTS" .PP @@ -531,12 +553,12 @@ font and others of various sizes, by using \fBShift-KP_Add\fP and can be selected using resources \fBsmallfont_key\fP/\fBbigfont_key\fP\&. .SH "LOGIN STAMP" .PP -\fBrxvt\fP tries to write an entry into the \fIutmp\fP(5) file so that it can be +\fBurxvt\fP tries to write an entry into the \fIutmp\fP(5) file so that it can be seen via the \fIwho(1)\fP command, and can accept messages\&. To allow this -feature, \fBrxvt\fP must be installed setuid root on some systems\&. +feature, \fBurxvt\fP must be installed setuid root on some systems\&. .SH "COLORS AND GRAPHICS" .PP -In addition to the default foreground and background colours, \fBrxvt\fP +In addition to the default foreground and background colours, \fBurxvt\fP can display up to 16 colours (8 ANSI colours plus high-intensity bold/blink versions of the same)\&. Here is a list of the colours with their \fBrgb\&.txt\fP names\&. @@ -1027,10 +1049,10 @@ would yield White on Black, while on \fIxterm\fP(1) it would yield Black on White\&. .SH "ENVIRONMENT" .PP -\fBrxvt\fP sets the environment variables \fBTERM\fP, \fBCOLORTERM\fP and +\fBurxvt\fP sets the environment variables \fBTERM\fP, \fBCOLORTERM\fP and \fBCOLORFGBG\fP\&. The environment variable \fBWINDOWID\fP is set to the X window -id number of the \fBrxvt\fP window and it also uses and sets the environment -variable \fBDISPLAY\fP to specify which display terminal to use\&. \fBrxvt\fP uses +id number of the \fBurxvt\fP window and it also uses and sets the environment +variable \fBDISPLAY\fP to specify which display terminal to use\&. \fBurxvt\fP uses the environment variables \fBRXVTPATH\fP and \fBPATH\fP to find XPM files\&. .SH "FILES" .PP diff --git a/doc/rxvt.tbl b/doc/rxvt.tbl index 34367583..8ce3cba5 100644 --- a/doc/rxvt.tbl +++ b/doc/rxvt.tbl @@ -1,10 +1,10 @@ -.TH "RXVT" "1" "2004-05-10" "X Version 11" "X Tools" +.TH "RXVT" "1" "2004-06-26" "X Version 11" "X Tools" .SH "NAME" rxvt-unicode (ouR XVT, unicode) \- a VT102 emulator for the X window system .PP .SH "SYNOPSIS" .PP -\fBrxvt\fP [options] [-e command [ args ]] +\fBurxvt\fP [options] [-e command [ args ]] .PP .SH "DESCRIPTION" .PP @@ -17,7 +17,7 @@ advantage on a machine serving many X sessions\&. .PP .SH "OPTIONS" .PP -The \fBrxvt\fP options (mostly a subset of \fIxterm\fP\&'s) are listed below\&. +The \fBurxvt\fP options (mostly a subset of \fIxterm\fP\&'s) are listed below\&. In keeping with the smaller-is-better philosophy, options may be eliminated or default values chosen at compile-time, so options and defaults listed may not accurately reflect the version installed on your system\&. @@ -27,7 +27,7 @@ dependent upon\&. e\&.g\&. `Compile \fIXIM\fP:\&' requires \fIXIM\fP on the \fI line\&. Note: `rxvt -help\&' gives a list of all command-line options compiled into your version\&. .PP -Note that \fBrxvt\fP permits the resource name to be used as a long-option +Note that \fBurxvt\fP permits the resource name to be used as a long-option (--/++ option) so the potential command-line options are far greater than those listed\&. For example: `rxvt --loginShell --color1 Orange\&'\&. @@ -80,12 +80,21 @@ resource \fBpointerColor2\fP\&. The colour of the border between the xterm scrollbar and the text; resource \fBborderColor\fP\&. .IP "\fB-fn\fP \fIfontname\fP" -Select the fonts to be used used\&. This is a comma seperated -list of font names that are used in turn when trying to display -unicode characters\&. The first font defines the cell size for characters, -other fonts might be smaller, but not larger\&. A reasonable default font list -is always appended to it\&. +Select the fonts to be used\&. +This is a comma seperated list of font names that are used in turn when +trying to display Unicode characters\&. +The first font defines the cell size for characters; other fonts might +be smaller, but not larger\&. +A reasonable default font list is always appended to it\&. resource \fBfont\fP\&. +.IP "\fB-rb\fP|\fB+rb\fP" +Enable "real bold" support\&. +When this option is on, bold text will be displayed using the first +available bold font in the font list\&. +Bold fonts should thus be specified in the font list after their +corresponding regular fonts\&. +If no bold font can be found, a regular font will be used\&. +resource \fBrealBold\fP\&. .IP "\fB-name\fP \fIname\fP" Specify the application name under which resources are to be obtained, rather than the default executable file name\&. @@ -146,7 +155,7 @@ This option specifies the name of the terminal type to be set in the \fItermcap(5)\fP database and should have \fIli#\fP and \fIco#\fP entries; resource \fBtermName\fP\&. .IP "\fB-e\fP \fIcommand [arguments]\fP" -Run the command with its command-line arguments in the \fBrxvt\fP +Run the command with its command-line arguments in the \fBurxvt\fP window; also sets the window title and icon name to be the basename of the program being executed if neither \fI-title\fP (\fI-T\fP) nor \fI-n\fP are given on the command line\&. If this option is used, it @@ -200,15 +209,15 @@ in some window managers\&. Note: `rxvt --help\&' gives a list of all resources (long options) compiled into your version\&. If compiled with internal Xresources support (i\&.e\&. \fBrxvt -h\fP lists -\fB\&.Xdefaults\fP) then \fBrxvt\fP accepts application defaults set in +\fB\&.Xdefaults\fP) then \fBurxvt\fP accepts application defaults set in XAPPLOADDIR/Rxvt (compile-time defined: usually \fB/usr/lib/X11/app-defaults/Rxvt\fP) and resources set in \fB~/\&.Xdefaults\fP, or \fB~/\&.Xresources\fP if \fB~/\&.Xdefaults\fP does not exist\&. Note that when -reading X resources, \fBrxvt\fP recognizes two class names: \fBXTerm\fP and +reading X resources, \fBurxvt\fP recognizes two class names: \fBXTerm\fP and \fBRxvt\fP\&. The class name \fBXTerm\fP allows resources common to both -\fBrxvt\fP and \fIxterm\fP to be easily configured, while the class name -\fBRxvt\fP allows resources unique to \fBrxvt\fP, notably colours and -key-handling, to be shared between different \fBrxvt\fP configurations\&. +\fBurxvt\fP and \fIxterm\fP to be easily configured, while the class name +\fBRxvt\fP allows resources unique to \fBurxvt\fP, notably colours and +key-handling, to be shared between different \fBurxvt\fP configurations\&. If no resources are specified, suitable defaults will be used\&. Command-line arguments can be used to override resource settings\&. The following resources are allowed: @@ -236,6 +245,7 @@ but the actual colour names used are listed in the .IP "\fBcolorBD:\fP \fIcolour\fP" Use the specified colour to display bold characters when the foreground colour is the default\&. +This option will be ignored if \fBrealBold\fP is enabled\&. .IP "\fBcolorUL:\fP \fIcolour\fP" Use the specified colour to display underlined characters when the foreground colour is the default\&. @@ -292,18 +302,30 @@ Specify the colon-delimited search path for finding files (XPM and menus), in addition to the paths specified by the \fBRXVTPATH\fP and \fBPATH\fP environment variables\&. .IP "\fBfont:\fP \fIfontname\fP" -Select the fonts to be used used\&. This is a comma seperated -list of font names that are used in turn when trying to display -unicode characters\&. The first font defines the cell size for characters, -other fonts might be smaller, but not larger\&. A reasonable default font list -is always appended to this list\&. +Select the fonts to be used\&. +This is a comma seperated list of font names that are used in turn when +trying to display Unicode characters\&. +The first font defines the cell size for characters; other fonts might +be smaller, but not larger\&. +A reasonable default font list is always appended to it\&. option \fB-fn\fP\&. +.IP "\fBrealBold:\fP \fIboolean\fP" +\fBTrue\fP: Enable "real bold" support\&. +When this option is on, bold text will be displayed using the first +available bold font in the font list\&. +Bold fonts should thus be specified in the font list after their +corresponding regular fonts\&. +If no bold font can be found, a regular font will be used\&. +option \fB-rb\fP\&. +\fBFalse\fP: Display bold text in a regular font, using the color +specified with \fBcolorBD\fP; +option \fB+rb\fP\&. .IP "\fBselectstyle:\fP \fImode\fP" Set mouse selection style to \fBold\fP which is 2\&.20, \fBoldword\fP which is xterm style with 2\&.20 old word selection, or anything else which gives xterm style selection\&. .IP "\fBscrollstyle:\fP \fImode\fP" -Set scrollbar style to \fBrxvt\fP, \fBrxvt\fP, \fBplain\fP, \fBnext\fP or \fBxterm\fP +Set scrollbar style to \fBurxvt\fP, \fBrxvt\fP, \fBplain\fP, \fBnext\fP or \fBxterm\fP .IP "\fBtitle:\fP \fIstring\fP" Set window title string, the default title is the command-line specified after the \fB-e\fP option, if any, otherwise the application @@ -484,9 +506,9 @@ intervening resource name \fBkeysym\&.\fP cannot be omitted\&. This resource is only available when compiled with KEYSYM_RESOURCE\&. .SH "THE SCROLLBAR" .PP -Lines of text that scroll off the top of the \fBrxvt\fP window (resource: +Lines of text that scroll off the top of the \fBurxvt\fP window (resource: \fBsaveLines\fP) and can be scrolled back using the scrollbar or by keystrokes\&. -The normal \fBrxvt\fP scrollbar has arrows and its behaviour is fairly +The normal \fBurxvt\fP scrollbar has arrows and its behaviour is fairly intuitive\&. The \fBxterm-scrollbar\fP is without arrows and its behaviour mimics that of \fIxterm\fP .PP @@ -517,7 +539,7 @@ Left double-click to select a word; Left triple-click to select the entire line\&. .IP "\fBInsertion\fP:" Pressing and releasing the Middle mouse button (or \fBShift-Insert\fP) -in an \fBrxvt\fP window causes the current text selection to be inserted +in an \fBurxvt\fP window causes the current text selection to be inserted as if it had been typed on the keyboard\&. .SH "CHANGING FONTS" .PP @@ -528,12 +550,12 @@ font and others of various sizes, by using \fBShift-KP_Add\fP and can be selected using resources \fBsmallfont_key\fP/\fBbigfont_key\fP\&. .SH "LOGIN STAMP" .PP -\fBrxvt\fP tries to write an entry into the \fIutmp\fP(5) file so that it can be +\fBurxvt\fP tries to write an entry into the \fIutmp\fP(5) file so that it can be seen via the \fIwho(1)\fP command, and can accept messages\&. To allow this -feature, \fBrxvt\fP must be installed setuid root on some systems\&. +feature, \fBurxvt\fP must be installed setuid root on some systems\&. .SH "COLORS AND GRAPHICS" .PP -In addition to the default foreground and background colours, \fBrxvt\fP +In addition to the default foreground and background colours, \fBurxvt\fP can display up to 16 colours (8 ANSI colours plus high-intensity bold/blink versions of the same)\&. Here is a list of the colours with their \fBrgb\&.txt\fP names\&. @@ -577,10 +599,10 @@ would yield White on Black, while on \fIxterm\fP(1) it would yield Black on White\&. .SH "ENVIRONMENT" .PP -\fBrxvt\fP sets the environment variables \fBTERM\fP, \fBCOLORTERM\fP and +\fBurxvt\fP sets the environment variables \fBTERM\fP, \fBCOLORTERM\fP and \fBCOLORFGBG\fP\&. The environment variable \fBWINDOWID\fP is set to the X window -id number of the \fBrxvt\fP window and it also uses and sets the environment -variable \fBDISPLAY\fP to specify which display terminal to use\&. \fBrxvt\fP uses +id number of the \fBurxvt\fP window and it also uses and sets the environment +variable \fBDISPLAY\fP to specify which display terminal to use\&. \fBurxvt\fP uses the environment variables \fBRXVTPATH\fP and \fBPATH\fP to find XPM files\&. .SH "FILES" .PP diff --git a/doc/yodl/rxvt-options.yo b/doc/yodl/rxvt-options.yo index 1aaaa19a..ea152cd3 100644 --- a/doc/yodl/rxvt-options.yo +++ b/doc/yodl/rxvt-options.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-options.yo,v 1.11 2004-04-02 19:15:57 pcg Exp $ --) +COMMENT(-- $Id: rxvt-options.yo,v 1.12 2004-07-26 14:57:12 root Exp $ --) COMMENT(----------------------------------------------------------------------) manpageoptions() @@ -66,12 +66,21 @@ startdit() The colour of the border between the xterm scrollbar and the text; resource bf(borderColor). dit(bf(-fn) em(fontname)) - Select the fonts to be used used. This is a comma seperated - list of font names that are used in turn when trying to display - unicode characters. The first font defines the cell size for characters, - other fonts might be smaller, but not larger. A reasonable default font list - is always appended to it. + Select the fonts to be used. + This is a comma seperated list of font names that are used in turn when + trying to display Unicode characters. + The first font defines the cell size for characters; other fonts might + be smaller, but not larger. + A reasonable default font list is always appended to it. resource bf(font). + dit(bf(-rb)|bf(+rb)) + Enable "real bold" support. + When this option is on, bold text will be displayed using the first + available bold font in the font list. + Bold fonts should thus be specified in the font list after their + corresponding regular fonts. + If no bold font can be found, a regular font will be used. + resource bf(realBold). dit(bf(-name) em(name)) Specify the application name under which resources are to be obtained, rather than the default executable file name. diff --git a/doc/yodl/rxvt-resources.yo b/doc/yodl/rxvt-resources.yo index e38355f0..919af3e4 100644 --- a/doc/yodl/rxvt-resources.yo +++ b/doc/yodl/rxvt-resources.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-resources.yo,v 1.13 2004-06-21 22:24:07 root Exp $ --) +COMMENT(-- $Id: rxvt-resources.yo,v 1.14 2004-07-26 14:57:12 root Exp $ --) COMMENT(----------------------------------------------------------------------) manpagesection(RESOURCES (available also as long-options)) @@ -42,6 +42,7 @@ startdit() dit(bf(colorBD:) em(colour)) Use the specified colour to display bold characters when the foreground colour is the default. + This option will be ignored if bf(realBold) is enabled. dit(bf(colorUL:) em(colour)) Use the specified colour to display underlined characters when the foreground colour is the default. @@ -98,12 +99,24 @@ startdit() menus), in addition to the paths specified by the bf(RXVTPATH) and bf(PATH) environment variables. dit(bf(font:) em(fontname)) - Select the fonts to be used used. This is a comma seperated - list of font names that are used in turn when trying to display - unicode characters. The first font defines the cell size for characters, - other fonts might be smaller, but not larger. A reasonable default font list - is always appended to this list. + Select the fonts to be used. + This is a comma seperated list of font names that are used in turn when + trying to display Unicode characters. + The first font defines the cell size for characters; other fonts might + be smaller, but not larger. + A reasonable default font list is always appended to it. option bf(-fn). + dit(bf(realBold:) em(boolean)) + bf(True): Enable "real bold" support. + When this option is on, bold text will be displayed using the first + available bold font in the font list. + Bold fonts should thus be specified in the font list after their + corresponding regular fonts. + If no bold font can be found, a regular font will be used. + option bf(-rb). + bf(False): Display bold text in a regular font, using the color + specified with bf(colorBD); + option bf(+rb). dit(bf(selectstyle:) em(mode)) Set mouse selection style to bf(old) which is 2.20, bf(oldword) which is xterm style with 2.20 old word selection, or anything else which diff --git a/doc/yodl/versioninfo.yo b/doc/yodl/versioninfo.yo index 4e5449c2..a32b5b94 100644 --- a/doc/yodl/versioninfo.yo +++ b/doc/yodl/versioninfo.yo @@ -1,8 +1,8 @@ -COMMENT(-- $Id: versioninfo.yo,v 1.16 2004-06-26 21:39:59 root Exp $ --) +COMMENT(-- $Id: versioninfo.yo,v 1.17 2004-07-26 14:57:12 root Exp $ --) DEFINEMACRO(RXVTNAME)(0) - (rxvt) + (urxvt) DEFINEMACRO(RXVTDATE)(0) - (2004-05-10) + (2004-06-26) DEFINEMACRO(RXVTVERSION)(0) (3.1) DEFINEMACRO(RXVTMAINT)(0) diff --git a/src/defaultfont.C b/src/defaultfont.C index 58b52132..182aa62b 100644 --- a/src/defaultfont.C +++ b/src/defaultfont.C @@ -1164,7 +1164,7 @@ rxvt_fontset::populate (const char *desc) } int -rxvt_fontset::find_font (unicode_t unicode) +rxvt_fontset::find_font (unicode_t unicode, bool bold) { for (unsigned int i = !!(0x20 <= unicode && unicode <= 0x7f); // skip pseudo-font for ascii i < fonts.size (); @@ -1181,7 +1181,13 @@ rxvt_fontset::find_font (unicode_t unicode) goto next_font; } - if (f->cs != CS_UNKNOWN && f->has_codepoint (unicode)) + if (f->cs == CS_UNKNOWN) + goto next_font; + + if (bold && f->properties ().weight < rxvt_fontprop::bold) + goto next_font; + + if (f->has_codepoint (unicode)) return i; next_font: @@ -1193,6 +1199,10 @@ rxvt_fontset::find_font (unicode_t unicode) } } + // if no bold font found, use a regular one + if (bold) + return find_font (unicode); + return 0; /* we must return SOME font */ } diff --git a/src/defaultfont.h b/src/defaultfont.h index d191b9c3..215a1305 100644 --- a/src/defaultfont.h +++ b/src/defaultfont.h @@ -108,7 +108,7 @@ struct rxvt_fontset { rxvt_font *new_font (const char *name, codeset cs); bool populate (const char *desc); - int find_font (uint32_t unicode); + int find_font (uint32_t unicode, bool bold = false); rxvt_font *operator [] (int id) const { diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in index 297702c0..f390e217 100644 --- a/src/rxvtlib.h.in +++ b/src/rxvtlib.h.in @@ -197,7 +197,7 @@ typedef struct { #define Opt_scrollTtyKeypress (1UL<<12) #define Opt_transparent (1UL<<13) #define Opt_transparent_all (1UL<<14) -#define Opt_15 (1UL<<15) // UNALLOCATED +#define Opt_realBold (1UL<<15) #define Opt_tripleclickwords (1UL<<16) #define Opt_scrollWithBuffer (1UL<<17) #define Opt_jumpScroll (1UL<<18) diff --git a/src/screen.C b/src/screen.C index 608b38c5..dd0644e2 100644 --- a/src/screen.C +++ b/src/screen.C @@ -50,41 +50,41 @@ inline void fill_text (text_t *start, text_t value, int len) * GENERAL SCREEN AND SELECTION UPDATE ROUTINES * * ------------------------------------------------------------------------- */ #define ZERO_SCROLLBACK() \ - if ((Options & Opt_scrollTtyOutput) == Opt_scrollTtyOutput) \ + if (Options & Opt_scrollTtyOutput) \ TermWin.view_start = 0 #define CLEAR_SELECTION() \ - selection.beg.row = selection.beg.col \ + selection.beg.row = selection.beg.col \ = selection.end.row = selection.end.col = 0 #define CLEAR_ALL_SELECTION() \ - selection.beg.row = selection.beg.col \ - = selection.mark.row = selection.mark.col \ + selection.beg.row = selection.beg.col \ + = selection.mark.row = selection.mark.col \ = selection.end.row = selection.end.col = 0 -#define ROW_AND_COL_IS_AFTER(A, B, C, D) \ +#define ROW_AND_COL_IS_AFTER(A, B, C, D) \ (((A) > (C)) || (((A) == (C)) && ((B) > (D)))) -#define ROW_AND_COL_IS_BEFORE(A, B, C, D) \ +#define ROW_AND_COL_IS_BEFORE(A, B, C, D) \ (((A) < (C)) || (((A) == (C)) && ((B) < (D)))) -#define ROW_AND_COL_IN_ROW_AFTER(A, B, C, D) \ +#define ROW_AND_COL_IN_ROW_AFTER(A, B, C, D) \ (((A) == (C)) && ((B) > (D))) -#define ROW_AND_COL_IN_ROW_AT_OR_AFTER(A, B, C, D) \ +#define ROW_AND_COL_IN_ROW_AT_OR_AFTER(A, B, C, D) \ (((A) == (C)) && ((B) >= (D))) -#define ROW_AND_COL_IN_ROW_BEFORE(A, B, C, D) \ +#define ROW_AND_COL_IN_ROW_BEFORE(A, B, C, D) \ (((A) == (C)) && ((B) < (D))) -#define ROW_AND_COL_IN_ROW_AT_OR_BEFORE(A, B, C, D) \ +#define ROW_AND_COL_IN_ROW_AT_OR_BEFORE(A, B, C, D) \ (((A) == (C)) && ((B) <= (D))) /* these must be row_col_t */ -#define ROWCOL_IS_AFTER(X, Y) \ +#define ROWCOL_IS_AFTER(X, Y) \ ROW_AND_COL_IS_AFTER ((X).row, (X).col, (Y).row, (Y).col) -#define ROWCOL_IS_BEFORE(X, Y) \ +#define ROWCOL_IS_BEFORE(X, Y) \ ROW_AND_COL_IS_BEFORE ((X).row, (X).col, (Y).row, (Y).col) -#define ROWCOL_IN_ROW_AFTER(X, Y) \ +#define ROWCOL_IN_ROW_AFTER(X, Y) \ ROW_AND_COL_IN_ROW_AFTER ((X).row, (X).col, (Y).row, (Y).col) -#define ROWCOL_IN_ROW_BEFORE(X, Y) \ +#define ROWCOL_IN_ROW_BEFORE(X, Y) \ ROW_AND_COL_IN_ROW_BEFORE ((X).row, (X).col, (Y).row, (Y).col) -#define ROWCOL_IN_ROW_AT_OR_AFTER(X, Y) \ +#define ROWCOL_IN_ROW_AT_OR_AFTER(X, Y) \ ROW_AND_COL_IN_ROW_AT_OR_AFTER ((X).row, (X).col, (Y).row, (Y).col) -#define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \ +#define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \ ROW_AND_COL_IN_ROW_AT_OR_BEFORE ((X).row, (X).col, (Y).row, (Y).col) /* @@ -94,22 +94,22 @@ inline void fill_text (text_t *start, text_t value, int len) */ #define drawBuffer TermWin.vt -#define CLEAR_ROWS(row, num) \ - if (TermWin.mapped) \ - XClearArea (display->display, drawBuffer, TermWin.int_bwidth, \ +#define CLEAR_ROWS(row, num) \ + if (TermWin.mapped) \ + XClearArea (display->display, drawBuffer, 0, \ Row2Pixel (row), (unsigned int)TermWin.width, \ (unsigned int)Height2Pixel (num), False) -#define CLEAR_CHARS(x, y, num) \ - if (TermWin.mapped) \ - XClearArea (display->display, drawBuffer, x, y, \ - (unsigned int)Width2Pixel (num), \ +#define CLEAR_CHARS(x, y, num) \ + if (TermWin.mapped) \ + XClearArea (display->display, drawBuffer, x, y, \ + (unsigned int)Width2Pixel (num), \ (unsigned int)Height2Pixel (1), False) -#define ERASE_ROWS(row, num) \ - XFillRectangle (display->display, drawBuffer, TermWin.gc, \ - TermWin.int_bwidth, Row2Pixel (row), \ - (unsigned int)TermWin.width, \ +#define ERASE_ROWS(row, num) \ + XFillRectangle (display->display, drawBuffer, TermWin.gc, \ + 0, Row2Pixel (row), \ + (unsigned int)TermWin.width, \ (unsigned int)Height2Pixel (num)) /* ------------------------------------------------------------------------- * @@ -899,7 +899,8 @@ rxvt_term::scr_add_lines (const unicode_t *str, int nlines, int len) if (c >= 0x10000) c = rxvt_composite.compose (c); // map to lower 16 bits #endif - rend_t rend = SET_FONT (rstyle, TermWin.fontset->find_font (c)); + bool bold = (Options & Opt_realBold) && ((rstyle & RS_Bold) != 0); + rend_t rend = SET_FONT (rstyle, TermWin.fontset->find_font (c, bold)); do { @@ -1749,9 +1750,9 @@ rxvt_term::scr_expose (int x, int y, int width, int height, bool refresh) return; #ifdef DEBUG_STRICT - x = max (x, (int)TermWin.int_bwidth); + x = max (x, 0); x = min (x, (int)TermWin.width); - y = max (y, (int)TermWin.int_bwidth); + y = max (y, 0); y = min (y, (int)TermWin.height); #endif @@ -2208,7 +2209,7 @@ rxvt_term::scr_refresh (unsigned char refresh_type) rvid = !!(rend & RS_RVid); #ifndef NO_BOLD_UNDERLINE_REVERSE - if (rend & RS_Bold && fore == Color_fg) + if (rend & RS_Bold && fore == Color_fg && !(Options & Opt_realBold)) { if (ISSET_PIXCOLOR (Color_BD)) fore = Color_BD; @@ -2324,6 +2325,7 @@ rxvt_term::scr_refresh (unsigned char refresh_type) /* * I: other general cleanup */ +#if 0 if (clearfirst && TermWin.int_bwidth) /* * clear the whole screen height, note that width == 0 is treated @@ -2342,6 +2344,7 @@ rxvt_term::scr_refresh (unsigned char refresh_type) TermWin.width + TermWin.int_bwidth, 0, (unsigned int)TermWin.int_bwidth, (unsigned int)TermWin_TotalHeight (), False); +#endif if (refresh_type & SMOOTH_REFRESH) XSync (display->display, False); diff --git a/src/xdefaults.C b/src/xdefaults.C index aa32668b..d9794845 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -155,6 +155,7 @@ optList[] = { RSTRG (Rs_color + minBrightCOLOR + 7, "color15", "color"), #endif /* NO_BRIGHTCOLOR */ #ifndef NO_BOLD_UNDERLINE_REVERSE + BOOL (Rs_realBold, "realBold", "rb", Opt_realBold, "use bold fonts for bold text"), RSTRG (Rs_color + Color_BD, "colorBD", "color"), RSTRG (Rs_color + Color_UL, "colorUL", "color"), RSTRG (Rs_color + Color_RV, "colorRV", "color"), -- 2.34.1