diff options
| author | Kenichi Handa | 2008-05-25 11:19:50 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-25 11:19:50 +0000 |
| commit | 505ecc496904f64f9725c2cadc962fc1c48933bc (patch) | |
| tree | 6746b26726b33ff5e1ceb403c9c58b187dc49ff6 /src/w32term.c | |
| parent | a6c4ecbc324627a24ed12afe91c112c6537801ed (diff) | |
| download | emacs-505ecc496904f64f9725c2cadc962fc1c48933bc.tar.gz emacs-505ecc496904f64f9725c2cadc962fc1c48933bc.zip | |
(x_draw_glyph_string): Fix calculation of underline
position.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 4 |
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) | |||
| 2891 | else | 2891 | else |
| 2892 | thickness = 1; | 2892 | thickness = 1; |
| 2893 | if (x_underline_at_descent_line) | 2893 | if (x_underline_at_descent_line) |
| 2894 | position = (s->height - thickness) - s->ybase; | 2894 | position = (s->height - thickness) - (s->ybase - s->y); |
| 2895 | else | 2895 | else |
| 2896 | { | 2896 | { |
| 2897 | /* Get the underline position. This is the recommended | 2897 | /* Get the underline position. This is the recommended |
| @@ -2912,7 +2912,7 @@ x_draw_glyph_string (s) | |||
| 2912 | /* Check the sanity of thickness and position. We should | 2912 | /* Check the sanity of thickness and position. We should |
| 2913 | avoid drawing underline out of the current line area. */ | 2913 | avoid drawing underline out of the current line area. */ |
| 2914 | if (s->y + s->height <= s->ybase + position) | 2914 | if (s->y + s->height <= s->ybase + position) |
| 2915 | position = s->y + s->height - 1; | 2915 | position = (s->height - 1) - (s->ybase - s->y); |
| 2916 | if (s->y + s->height < s->ybase + position + thickness) | 2916 | if (s->y + s->height < s->ybase + position + thickness) |
| 2917 | thickness = (s->y + s->height) - (s->ybase + position); | 2917 | thickness = (s->y + s->height) - (s->ybase + position); |
| 2918 | s->underline_thickness = thickness; | 2918 | s->underline_thickness = thickness; |