From 951b8112ca8f04c26ba1be0c97a99a043122b39d Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sun, 25 May 2008 11:04:53 +0000 Subject: [PATCH] (xftfont_open): Delete unused variable. If underline_thickness is not 1, adjust underline_position. --- src/xftfont.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xftfont.c b/src/xftfont.c index 4b0a15deba9..27fbd7241a4 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -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 { -- 2.39.2