From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.bugs Subject: bug#20628: 25.0.50; Incorrect line height for some fonts Date: Fri, 22 May 2015 18:54:17 +0200 Message-ID: <87egm84kp2.fsf@gmail.com> References: <555E9C2E.8040008@live.com> <83617l5aox.fsf@gnu.org> <87pp5s2a77.fsf@gmail.com> <83wq004x2w.fsf@gnu.org> <83twv44vd3.fsf@gnu.org> <87egm87ny6.fsf@gmail.com> <83oalc4syu.fsf@gnu.org> <87617k7m5u.fsf@gmail.com> <83mw0w4seb.fsf@gnu.org> <87zj4w66ds.fsf@gmail.com> <83lhgg4qhf.fsf@gnu.org> <87iobk64e6.fsf@gmail.com> <83h9r44o63.fsf@gnu.org> <87pp5sy4vu.fsf@gmail.com> <83egm84mj3.fsf@gnu.org> <87617k6127.fsf@gmail.com> <83d21s4lpx.fsf@gnu.org> <87twv44lnc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1432314121 20163 80.91.229.3 (22 May 2015 17:02:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 May 2015 17:02:01 +0000 (UTC) Cc: clement.pitclaudel@live.com, 20628@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 22 19:01:52 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YvqJy-00071H-3I for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 19:01:18 +0200 Original-Received: from localhost ([::1]:35091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvqJx-0001kt-HI for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 13:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvqJn-0001ia-TH for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 13:01:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvqJk-0000KT-88 for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 13:01:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvqJk-0000KN-4A for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 13:01:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YvqJj-0007cs-IM for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 13:01:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Oleh Krehel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 May 2015 17:01:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20628 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20628-submit@debbugs.gnu.org id=B20628.143231404429282 (code B ref 20628); Fri, 22 May 2015 17:01:03 +0000 Original-Received: (at 20628) by debbugs.gnu.org; 22 May 2015 17:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:53126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YvqJO-0007cA-Av for submit@debbugs.gnu.org; Fri, 22 May 2015 13:00:44 -0400 Original-Received: from mail-wg0-f44.google.com ([74.125.82.44]:35234) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YvqJK-0007bv-Rh for 20628@debbugs.gnu.org; Fri, 22 May 2015 13:00:40 -0400 Original-Received: by wgfl8 with SMTP id l8so23421601wgf.2 for <20628@debbugs.gnu.org>; Fri, 22 May 2015 10:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=4vTutpNH0neN4Qqs160rDOfPeFQ3KKihr7hOqinH3/s=; b=ddiul7B3KHHi2LOFxsLkE8YTHaE6ee+5Qnu7z2OXiRTQWpM4Oag6onKAZyflixBaRh KcTENplTPR8uYEoEe4vhBtnvsiajzcfF041J+sHs2SXl+W6Dh7r3MWkxW6fyshQPCdM2 gdba7lMwpfHIGju0QmFTPRlTl4Mx5ibFIPnlA8jAvk53+pb8RoyP/HyiQUUNW7wukAZM ERA9QJtKrutsvoBQclSA/+0mv8vPiLH79ANXdxBEry6MyK0NAuHoM0FlwA08gl8rD1EO +vAEv3nJ7SlQxY4ixzCjO0QdW2XT5Tf2pTDrQ67S/OPMoQk9QXfphaS6glY0Z5MucS3h /GQw== X-Received: by 10.180.87.199 with SMTP id ba7mr9505933wib.81.1432314031936; Fri, 22 May 2015 10:00:31 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id i6sm3970018wjf.29.2015.05.22.10.00.30 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 22 May 2015 10:00:30 -0700 (PDT) In-Reply-To: <87twv44lnc.fsf@gmail.com> (Oleh Krehel's message of "Fri, 22 May 2015 18:33:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103047 Archived-At: --=-=-= Content-Type: text/plain I attach a patch that sets ascent/descent to 0 specifically for the problematic font family "Latin Modern Math". This way, the problem is solved for me for all 1152 chars with "math" in their name that `ucs-names' returns. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Set-font-ascent-descent-to-zero-for-Latin-Modern-Mat.patch >From 802b84adc05a92650ee882ddd25e6860bacde457 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Fri, 22 May 2015 18:46:51 +0200 Subject: [PATCH] Set font ascent/descent to zero for "Latin Modern Math" * src/xftfont.c (xftfont_open): Update. --- src/xftfont.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xftfont.c b/src/xftfont.c index 0e8b876..a09f7fc 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -289,6 +289,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) FcPatternAddInteger (pat, FC_WIDTH, FONT_WIDTH_NUMERIC (entity)); FcPatternAddDouble (pat, FC_PIXEL_SIZE, pixel_size); val = AREF (entity, FONT_FAMILY_INDEX); + int mathp = strcmp("Latin Modern Math", SDATA(SYMBOL_NAME(val))) == 0; if (! NILP (val)) FcPatternAddString (pat, FC_FAMILY, (FcChar8 *) SDATA (SYMBOL_NAME (val))); val = AREF (entity, FONT_FOUNDRY_INDEX); @@ -332,6 +333,11 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) XftPatternDestroy (match); return Qnil; } + if (mathp) + { + xftfont->ascent = 0; + xftfont->descent = 0; + } ft_face = XftLockFace (xftfont); unblock_input (); -- 1.8.4 --=-=-=--