changeset 95293:089ad7a58f94

(xftfont_open): Delete unused variable. If underline_thickness is not 1, adjust underline_position.
author Kenichi Handa <handa@m17n.org>
date Sun, 25 May 2008 11:04:53 +0000
parents fb55eb329b54
children 50c2a5438c6c
files src/xftfont.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xftfont.c	Sun May 25 11:03:14 2008 +0000
+++ b/src/xftfont.c	Sun May 25 11:04:53 2008 +0000
@@ -185,7 +185,7 @@
      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 @@
 
       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
     {