Mercurial > emacs
changeset 95295:9a9e4682d009
(x_draw_glyph_string): Fix calculation of underline
position.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 25 May 2008 11:14:31 +0000 |
parents | 50c2a5438c6c |
children | e76b055e122c |
files | src/xterm.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Sun May 25 11:09:53 2008 +0000 +++ b/src/xterm.c Sun May 25 11:14:31 2008 +0000 @@ -2725,7 +2725,7 @@ else thickness = 1; if (x_underline_at_descent_line) - position = (s->height - thickness) - s->ybase; + position = (s->height - thickness) - (s->ybase - s->y); else { /* Get the underline position. This is the recommended @@ -2746,7 +2746,7 @@ /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ if (s->y + s->height <= s->ybase + position) - position = s->y + s->height - 1; + position = (s->height - 1) - (s->ybase - s->y); if (s->y + s->height < s->ybase + position + thickness) thickness = (s->y + s->height) - (s->ybase + position); s->underline_thickness = thickness;