diff options
author | Gerd Moellmann <[email protected]> | 2000-04-09 20:30:25 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 2000-04-09 20:30:25 +0000 |
commit | a4a76b61f9891681feccd0fc1cc765e6be4186be (patch) | |
tree | a356758f0b298db9f93887b55e1672ee875f9034 /src | |
parent | 706239c766ae4f0a229f83335904dae0f2f81365 (diff) |
(tty_suppress_bold_inverse_default_colors_p): New
variable.
(realize_tty_face): Suppress boldness if colors are the inverse of
the default colors, and tty_suppress_bold_inverse_default_colors_p
is set.
(Ftty_suppress_bold_inverse_default_colors): New function.
(syms_of_xfaces): Defsubr it.
Diffstat (limited to 'src')
-rw-r--r-- | src/xfaces.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 00697cdee2..d775cc174c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -410,6 +410,13 @@ static int clear_font_table_count; int face_change_count; +/* Non-zero means don't display bold text if a face's foreground + and background colors are the inverse of the default colors of the + display. This is a kluge to suppress `bold black' foreground text + which is hard to read on an LCD monitor. */ + +int tty_suppress_bold_inverse_default_colors_p; + /* The total number of colors currently allocated. */ #if GLYPH_DEBUG @@ -6154,10 +6161,33 @@ realize_tty_face (cache, attrs, c) face->background = tem; } + if (tty_suppress_bold_inverse_default_colors_p + && face->tty_bold_p + && face->background == FACE_TTY_DEFAULT_FG_COLOR + && face->foreground == FACE_TTY_DEFAULT_BG_COLOR) + face->tty_bold_p = 0; + return face; } +DEFUN ("tty-suppress-bold-inverse-default-colors", + Ftty_suppress_bold_inverse_default_colors, + Stty_suppress_bold_inverse_default_colors, 1, 1, 0, + "Suppress/allow boldness of faces with inverse default colors.\n\ +SUPPRESS non-nil means suppress it.\n\ +This affects bold faces whose foreground is the default background color\n\ +of the display and whose background is the default foreground color.\n\ +For such faces, no bold text will be displayed.") + (suppress) + Lisp_Object suppress; +{ + tty_suppress_bold_inverse_default_colors_p = !NILP (suppress); + ++face_change_count; + return suppress; +} + + /*********************************************************************** Computing Faces @@ -6670,6 +6700,7 @@ syms_of_xfaces () defsubr (&Sshow_face_resources); #endif /* GLYPH_DEBUG */ defsubr (&Sclear_face_cache); + defsubr (&Stty_suppress_bold_inverse_default_colors); DEFVAR_LISP ("font-list-limit", &Vfont_list_limit, "*Limit for font matching.\n\ |