]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_draw_glyph_string): Fix calculation of underline
authorKenichi Handa <handa@m17n.org>
Sun, 25 May 2008 11:19:50 +0000 (11:19 +0000)
committerKenichi Handa <handa@m17n.org>
Sun, 25 May 2008 11:19:50 +0000 (11:19 +0000)
position.

src/ChangeLog
src/w32term.c
src/xterm.c

index 5de6cd8a75e8387af911feac5d7c5dd3e7b57350..f9a137c290e5cd2aeda566174c4ec138075d6592 100644 (file)
@@ -1,3 +1,31 @@
+2008-05-25  Kenichi Handa  <handa@m17n.org>
+
+       * 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  <eliz@gnu.org>
 
        * w32proc.c: Include dispextern.h.
index 5f5a3f954a96ad930261a49c3238e0ac16151604..0fbbf370fa2f92d727f1b9be6620b96f8da64805 100644 (file)
@@ -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;
index b2683298ca05a31484d605a23389bfb6c459e18a..03f06f33f04d90d67466d994ea348b179cc89cfb 100644 (file)
@@ -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;