summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-04-03 11:25:12 +0000
committerGerd Moellmann <gerd@gnu.org>2001-04-03 11:25:12 +0000
commita72d5ce5f36654979ab6972c485f3900297f29e6 (patch)
tree8cde50336c1bc7bf04183657cddca052b0d3ccb8
parent9acb8eec807b425464e40eb028962bec5f584e92 (diff)
downloademacs-a72d5ce5f36654979ab6972c485f3900297f29e6.tar.gz
(x_use_underline_position_properties): New variable.
(x_draw_glyph_string): Use it. (syms_of_xterm): DEFVAR_BOOL it.
-rw-r--r--src/xterm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 26e0c539b77..f4cce32b5fa 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -256,6 +256,10 @@ static int any_help_event_p;
int x_stretch_cursor_p;
+/* Non-zero means make use of UNDERLINE_POSITION font properties. */
+
+int x_use_underline_position_properties;
+
/* This is a chain of structures for all the X displays currently in
use. */
@@ -4498,7 +4502,8 @@ x_draw_glyph_string (s)
ROUND ((maximum descent) / 2), with
ROUND(x) = floor (x + 0.5) */
- if (XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &tem))
+ if (x_use_underline_position_properties
+ && XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &tem))
y = s->ybase + (long) tem;
else if (s->face->font)
y = s->ybase + (s->face->font->max_bounds.descent + 1) / 2;
@@ -14411,6 +14416,14 @@ For example, if a block cursor is over a tab, it will be drawn as\n\
wide as that tab on the display.");
x_stretch_cursor_p = 0;
+ DEFVAR_BOOL ("x-use-underline-position-properties",
+ &x_use_underline_position_properties,
+ "*Non-nil means make use of UNDERLINE_POSITION font properties.\n\
+Nil means ignore them. If you encounter fonts with bogus\n\
+UNDERLINE_POSITION font properties, for example 7x13 on XFree prior\n\
+to 4.1, set this to nil.");
+ x_use_underline_position_properties = 1;
+
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
"What X toolkit scroll bars Emacs uses.\n\
A value of nil means Emacs doesn't use X toolkit scroll bars.\n\