# HG changeset patch # User Gerd Moellmann # Date 955312225 0 # Node ID b8ac36c5839153dc97618b47aa91ba6ed27fe640 # Parent 7618c3801a21230c93de036bb120a56f44ffa22e (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. diff -r 7618c3801a21 -r b8ac36c58391 src/xfaces.c --- a/src/xfaces.c Sun Apr 09 20:24:49 2000 +0000 +++ b/src/xfaces.c Sun Apr 09 20:30:25 2000 +0000 @@ -410,6 +410,13 @@ 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 @@ 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 @@ 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\