diff options
| author | Gerd Moellmann | 2001-04-03 11:25:12 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-04-03 11:25:12 +0000 |
| commit | a72d5ce5f36654979ab6972c485f3900297f29e6 (patch) | |
| tree | 8cde50336c1bc7bf04183657cddca052b0d3ccb8 /src | |
| parent | 9acb8eec807b425464e40eb028962bec5f584e92 (diff) | |
| download | emacs-a72d5ce5f36654979ab6972c485f3900297f29e6.tar.gz emacs-a72d5ce5f36654979ab6972c485f3900297f29e6.zip | |
(x_use_underline_position_properties): New variable.
(x_draw_glyph_string): Use it.
(syms_of_xterm): DEFVAR_BOOL it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 15 |
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; | |||
| 256 | 256 | ||
| 257 | int x_stretch_cursor_p; | 257 | int x_stretch_cursor_p; |
| 258 | 258 | ||
| 259 | /* Non-zero means make use of UNDERLINE_POSITION font properties. */ | ||
| 260 | |||
| 261 | int x_use_underline_position_properties; | ||
| 262 | |||
| 259 | /* This is a chain of structures for all the X displays currently in | 263 | /* This is a chain of structures for all the X displays currently in |
| 260 | use. */ | 264 | use. */ |
| 261 | 265 | ||
| @@ -4498,7 +4502,8 @@ x_draw_glyph_string (s) | |||
| 4498 | ROUND ((maximum descent) / 2), with | 4502 | ROUND ((maximum descent) / 2), with |
| 4499 | ROUND(x) = floor (x + 0.5) */ | 4503 | ROUND(x) = floor (x + 0.5) */ |
| 4500 | 4504 | ||
| 4501 | if (XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &tem)) | 4505 | if (x_use_underline_position_properties |
| 4506 | && XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &tem)) | ||
| 4502 | y = s->ybase + (long) tem; | 4507 | y = s->ybase + (long) tem; |
| 4503 | else if (s->face->font) | 4508 | else if (s->face->font) |
| 4504 | y = s->ybase + (s->face->font->max_bounds.descent + 1) / 2; | 4509 | 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\ | |||
| 14411 | wide as that tab on the display."); | 14416 | wide as that tab on the display."); |
| 14412 | x_stretch_cursor_p = 0; | 14417 | x_stretch_cursor_p = 0; |
| 14413 | 14418 | ||
| 14419 | DEFVAR_BOOL ("x-use-underline-position-properties", | ||
| 14420 | &x_use_underline_position_properties, | ||
| 14421 | "*Non-nil means make use of UNDERLINE_POSITION font properties.\n\ | ||
| 14422 | Nil means ignore them. If you encounter fonts with bogus\n\ | ||
| 14423 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior\n\ | ||
| 14424 | to 4.1, set this to nil."); | ||
| 14425 | x_use_underline_position_properties = 1; | ||
| 14426 | |||
| 14414 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 14427 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| 14415 | "What X toolkit scroll bars Emacs uses.\n\ | 14428 | "What X toolkit scroll bars Emacs uses.\n\ |
| 14416 | A value of nil means Emacs doesn't use X toolkit scroll bars.\n\ | 14429 | A value of nil means Emacs doesn't use X toolkit scroll bars.\n\ |