]> git.eshelyaron.com Git - emacs.git/commitdiff
(xftfont_open): Delete unused variable. If
authorKenichi Handa <handa@m17n.org>
Sun, 25 May 2008 11:04:53 +0000 (11:04 +0000)
committerKenichi Handa <handa@m17n.org>
Sun, 25 May 2008 11:04:53 +0000 (11:04 +0000)
underline_thickness is not 1, adjust underline_position.

src/xftfont.c

index 4b0a15deba92622f7bed1a3b4fe5885adb1770ca..27fbd7241a4997e5d8943c78b98f66bea4e19b3f 100644 (file)
@@ -185,7 +185,7 @@ xftfont_open (f, entity, pixel_size)
      int pixel_size;
 {
   Display *display = FRAME_X_DISPLAY (f);
-  Lisp_Object val, filename, cache, font_object;
+  Lisp_Object val, filename, font_object;
   FcPattern *pat = NULL;
   struct xftfont_info *xftfont_info = NULL;
   struct font *font;
@@ -294,6 +294,8 @@ xftfont_open (f, entity, pixel_size)
 
       font->underline_position = -ft_face->underline_position * size / upEM;
       font->underline_thickness = -ft_face->underline_thickness * size / upEM;
+      if (font->underline_thickness > 2)
+       font->underline_position -= font->underline_thickness / 2;
     }
   else
     {