From: Kenichi Handa Date: Sun, 25 May 2008 11:19:50 +0000 (+0000) Subject: (x_draw_glyph_string): Fix calculation of underline X-Git-Tag: emacs-pretest-23.0.90~5302 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=505ecc496904f64f9725c2cadc962fc1c48933bc;p=emacs.git (x_draw_glyph_string): Fix calculation of underline position. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5de6cd8a75e..f9a137c290e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,31 @@ +2008-05-25 Kenichi Handa + + * w32term.c (x_draw_glyph_string): Fix calculation of underline + position. + + * xterm.c (x_draw_glyph_string): Fix calculation of underline + position. + + * xfaces.c: Delete unused function prototypes. + (xstrlwr, font_frame): Delete them. + (clear_face_cache): Delete unused variable. + + * xftfont.c (xftfont_open): Delete unused variable. If + underline_thickness is not 1, adjust underline_position. + + * ftxfont.c (ftxfont_open): Delete unused variable. + + * fontset.c (face_for_char): Optimize for the case of no charset + property. + + * font.c (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE) + (check_gstring, check_otf_features, otf_list, otf_tag_symbol) + (otf_open, font_otf_capability, generate_otf_features) + (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): + Commented out by surrounding "#if 0" and "#endif" for the moment. + (Ffont_drive_otf, Ffont_otf_alternates): Likewise. + (syms_of_font): Codes for accessing above commented out. + 2008-05-24 Eli Zaretskii * w32proc.c: Include dispextern.h. 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; diff --git a/src/xterm.c b/src/xterm.c index b2683298ca0..03f06f33f04 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2725,7 +2725,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 @@ -2746,7 +2746,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;