GNU bug report logs -
#26
Consistent underline face end of line to edge extension on X
Previous Next
Full log
Message #25 received at 26 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
David De La Harpe Golden wrote:
> (i) N.B. Extension happens anyway, if the background happens to be
> different to the frame background
Anyway, if you do consider it a bug that that extension happens, then
just making underline and overline drawing use width rather than
background_width (like overstrike) in src/xterm.c probably resolves
that? (at least on bitmapped displays)
Illustrative screenshots included - note how a nonmatching background
causes the ugly (in this context) extension.
[xdisp_no_underline_extension.diff (text/x-patch, inline)]
Index: src/xterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/xterm.c,v
retrieving revision 1.981
diff -u -r1.981 xterm.c
--- src/xterm.c 3 Mar 2008 06:32:12 -0000 1.981
+++ src/xterm.c 4 Mar 2008 02:12:58 -0000
@@ -2978,14 +2978,14 @@
if (s->face->underline_defaulted_p)
XFillRectangle (s->display, s->window, s->gc,
- s->x, y, s->background_width, h);
+ s->x, y, s->width, h);
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, h);
+ s->x, y, s->width, h);
XSetForeground (s->display, s->gc, xgcv.foreground);
}
}
@@ -2997,14 +2997,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);
}
}
[emacs_xdisp_no_underline_extension.png (image/png, inline)]
[emacs_xdisp_underline_extension_with_bg.png (image/png, inline)]
This bug report was last modified 15 years and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.