# HG changeset patch # User Kenichi Handa # Date 1211713493 0 # Node ID 089ad7a58f941ab4fe14c46f73bf4a4fdc55661d # Parent fb55eb329b540715d357277e046177b212f26f85 (xftfont_open): Delete unused variable. If underline_thickness is not 1, adjust underline_position. diff -r fb55eb329b54 -r 089ad7a58f94 src/xftfont.c --- 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 {