aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorStefan Monnier2008-06-10 20:22:10 +0000
committerStefan Monnier2008-06-10 20:22:10 +0000
commit2a3bd2e19336d9a83349575859cfb4842c2ec861 (patch)
tree99185c9d37c39d003f8b6395e03aa9c866be64f3 /src/xterm.c
parentd5dc61631e773495e96ed2bbd3bca16c981e9f7e (diff)
downloademacs-2a3bd2e19336d9a83349575859cfb4842c2ec861.tar.gz
emacs-2a3bd2e19336d9a83349575859cfb4842c2ec861.zip
* xdisp.c (underline_minimum_offset): Rename from xterm.c's
x_underline_minimum_display_offset. (syms_of_xdisp): Declare it here rather than in xterm.c. * dispextern.h (underline_minimum_offset): Declare it. * w32term.c (x_draw_glyph_string): Use it. * xterm.c (x_underline_minimum_display_offset): Move to xdisp.c. (syms_of_xterm): Don't declare it any more. (x_draw_glyph_string): Adjust to the new name. * cus-start.el (underline-minimum-offset) Rename from x-underline-minimum-display-offset.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 13c2d2e4a97..d2222b4a9b9 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -183,12 +183,6 @@ int x_use_underline_position_properties;
183 183
184int x_underline_at_descent_line; 184int x_underline_at_descent_line;
185 185
186/* Require underline to be at least this many screen pixels below baseline
187 This to avoid underline "merging" with the base of letters at small
188 font sizes, particularly when x_use_underline_position_properties is on. */
189
190int x_underline_minimum_display_offset;
191
192/* This is a chain of structures for all the X displays currently in 186/* This is a chain of structures for all the X displays currently in
193 use. */ 187 use. */
194 188
@@ -2750,8 +2744,7 @@ x_draw_glyph_string (s)
2750 else if (s->font) 2744 else if (s->font)
2751 position = (s->font->descent + 1) / 2; 2745 position = (s->font->descent + 1) / 2;
2752 } 2746 }
2753 if (x_underline_minimum_display_offset) 2747 position = max (position, underline_minimum_offset);
2754 position = max (position, eabs (x_underline_minimum_display_offset));
2755 } 2748 }
2756 /* Check the sanity of thickness and position. We should 2749 /* Check the sanity of thickness and position. We should
2757 avoid drawing underline out of the current line area. */ 2750 avoid drawing underline out of the current line area. */
@@ -10789,8 +10782,8 @@ syms_of_xterm ()
10789 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. 10782 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
10790A value of nil means ignore them. If you encounter fonts with bogus 10783A value of nil means ignore them. If you encounter fonts with bogus
10791UNDERLINE_POSITION font properties, for example 7x13 on XFree prior 10784UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
10792to 4.1, set this to nil. Variable `x-underline-minimum-display-offset' may 10785to 4.1, set this to nil. You can also use `underline-minimum-offset'
10793be used to override the font's UNDERLINE_POSITION for small font display 10786to override the font's UNDERLINE_POSITION for small font display
10794sizes. */); 10787sizes. */);
10795 x_use_underline_position_properties = 1; 10788 x_use_underline_position_properties = 1;
10796 10789
@@ -10802,16 +10795,6 @@ variable `x-use-underline-position-properties', which is usually at the
10802baseline level. The default value is nil. */); 10795baseline level. The default value is nil. */);
10803 x_underline_at_descent_line = 0; 10796 x_underline_at_descent_line = 0;
10804 10797
10805 DEFVAR_INT ("x-underline-minimum-display-offset",
10806 &x_underline_minimum_display_offset,
10807 doc: /* *When > 0, underline is drawn at least that many screen pixels below baseline.
10808This can improve legibility of underlined text at small font sizes,
10809particularly when using variable `x-use-underline-position-properties'
10810with fonts that specify an UNDERLINE_POSITION relatively close to the
10811baseline. The default value is 0. */);
10812 x_underline_minimum_display_offset = 0;
10813
10814
10815 DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", 10798 DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",
10816 &x_mouse_click_focus_ignore_position, 10799 &x_mouse_click_focus_ignore_position,
10817 doc: /* Non-nil means that a mouse click to focus a frame does not move point. 10800 doc: /* Non-nil means that a mouse click to focus a frame does not move point.