From: Eli Zaretskii Date: Thu, 25 Feb 2016 19:59:57 +0000 (+0200) Subject: Remove unneeded workaround in xftfont.c X-Git-Tag: emacs-25.0.92~33 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d2dd614716e34edb5891e58c029741cd6b32217d;p=emacs.git Remove unneeded workaround in xftfont.c * src/xftfont.c (xftfont_open): Remove "dirty workaround" for XftTextExtents8 behavior, as it is no longer needed. Suggested by Fangwen Yu . (Bug#22383) --- diff --git a/src/xftfont.c b/src/xftfont.c index 110f99a9be9..d94955f296a 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -395,16 +395,6 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) font->ascent = xftfont->ascent; font->descent = xftfont->descent; - if (pixel_size >= 5) - { - /* The above condition is a dirty workaround because - XftTextExtents8 behaves strangely for some fonts - (e.g. "Dejavu Sans Mono") when pixel_size is less than 5. */ - if (font->ascent < extents.y) - font->ascent = extents.y; - if (font->descent < extents.height - extents.y) - font->descent = extents.height - extents.y; - } font->height = font->ascent + font->descent; if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0)