summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-05-25 11:19:50 +0000
committerKenichi Handa <handa@m17n.org>2008-05-25 11:19:50 +0000
commit505ecc496904f64f9725c2cadc962fc1c48933bc (patch)
tree6746b26726b33ff5e1ceb403c9c58b187dc49ff6 /src/w32term.c
parenta6c4ecbc324627a24ed12afe91c112c6537801ed (diff)
downloademacs-505ecc496904f64f9725c2cadc962fc1c48933bc.tar.gz
(x_draw_glyph_string): Fix calculation of underline
position.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 5f5a3f954a9..0fbbf370fa2 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2891,7 +2891,7 @@ x_draw_glyph_string (s)
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
@@ -2912,7 +2912,7 @@ x_draw_glyph_string (s)
/* 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;