changeset 103509:9c0aa5262fc9

* w32term.c (x_draw_glyph_string): Use the glyph string's width rather than its background_width for drawing the overline and underline (Bug#489). * xterm.c (x_draw_glyph_string): Use the glyph string's width rather than its background_width for drawing the overline and underline (Bug#489).
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 22 Jun 2009 02:01:56 +0000
parents b3c1a923f213
children cff2fbe454dc
files src/ChangeLog src/w32term.c src/xterm.c
diffstat 3 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Jun 22 01:53:11 2009 +0000
+++ b/src/ChangeLog	Mon Jun 22 02:01:56 2009 +0000
@@ -1,5 +1,13 @@
 2009-06-22  Chong Yidong  <cyd@stupidchicken.com>
 
+	* w32term.c (x_draw_glyph_string): Use the glyph string's width
+	rather than its background_width for drawing the overline and
+	underline (Bug#489).
+
+	* xterm.c (x_draw_glyph_string): Use the glyph string's width
+	rather than its background_width for drawing the overline and
+	underline (Bug#489).
+
 	* xdisp.c (Qbefore_string, Qafter_string): Add externs.
 	(load_overlay_strings): Remove externs.
 	(fast_find_position): Function deleted.
--- a/src/w32term.c	Mon Jun 22 01:53:11 2009 +0000
+++ b/src/w32term.c	Mon Jun 22 02:01:56 2009 +0000
@@ -2401,12 +2401,12 @@
           if (s->face->underline_defaulted_p)
             {
               w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
-                             y, s->background_width, 1);
+                             y, s->width, 1);
             }
           else
             {
               w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
-                             y, s->background_width, 1);
+                             y, s->width, 1);
             }
         }
       /* Draw overline.  */
@@ -2417,12 +2417,12 @@
           if (s->face->overline_color_defaulted_p)
             {
               w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
-                             s->y + dy, s->background_width, h);
+                             s->y + dy, s->width, h);
             }
           else
             {
               w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
-                             s->y + dy, s->background_width, h);
+                             s->y + dy, s->width, h);
             }
         }
 
--- a/src/xterm.c	Mon Jun 22 01:53:11 2009 +0000
+++ b/src/xterm.c	Mon Jun 22 02:01:56 2009 +0000
@@ -2793,14 +2793,14 @@
 	  y = s->ybase + position;
 	  if (s->face->underline_defaulted_p)
 	    XFillRectangle (s->display, s->window, s->gc,
-			    s->x, y, s->background_width, thickness);
+			    s->x, y, s->width, thickness);
 	  else
 	    {
 	      XGCValues xgcv;
 	      XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
 	      XSetForeground (s->display, s->gc, s->face->underline_color);
 	      XFillRectangle (s->display, s->window, s->gc,
-			      s->x, y, s->background_width, thickness);
+			      s->x, y, s->width, thickness);
 	      XSetForeground (s->display, s->gc, xgcv.foreground);
 	    }
 	}
@@ -2812,14 +2812,14 @@
 
 	  if (s->face->overline_color_defaulted_p)
 	    XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
-			    s->background_width, h);
+			    s->width, h);
 	  else
 	    {
 	      XGCValues xgcv;
 	      XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
 	      XSetForeground (s->display, s->gc, s->face->overline_color);
 	      XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
-			      s->background_width, h);
+			      s->width, h);
 	      XSetForeground (s->display, s->gc, xgcv.foreground);
 	    }
 	}