From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20628: 25.0.50; Incorrect line height for some fonts Date: Fri, 22 May 2015 10:32:46 +0300 Message-ID: <83617l5aox.fsf@gnu.org> References: <555E9C2E.8040008@live.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1432280006 26824 80.91.229.3 (22 May 2015 07:33:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 May 2015 07:33:26 +0000 (UTC) Cc: 20628@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 22 09:33:12 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 1YvhSC-000300-Gk for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 09:33:12 +0200 Original-Received: from localhost ([::1]:60666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvhSB-00070q-Ug for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 03:33:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvhS8-00070j-F4 for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 03:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvhS3-0002jT-BZ for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 03:33:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvhS3-0002jP-8l for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 03:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YvhS2-00067v-Ot for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 03:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 May 2015 07:33:02 +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.143227998023543 (code B ref 20628); Fri, 22 May 2015 07:33:02 +0000 Original-Received: (at 20628) by debbugs.gnu.org; 22 May 2015 07:33:00 +0000 Original-Received: from localhost ([127.0.0.1]:52543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YvhRz-00067f-RW for submit@debbugs.gnu.org; Fri, 22 May 2015 03:33:00 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:37556) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YvhRu-00067J-2O for 20628@debbugs.gnu.org; Fri, 22 May 2015 03:32:55 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NOQ00G00POGBR00@mtaout24.012.net.il> for 20628@debbugs.gnu.org; Fri, 22 May 2015 10:24:09 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOQ00FY2PW9CT10@mtaout24.012.net.il>; Fri, 22 May 2015 10:24:09 +0300 (IDT) In-reply-to: <555E9C2E.8040008@live.com> X-012-Sender: halo1@inter.net.il 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:103016 Archived-At: > Date: Thu, 21 May 2015 23:02:06 -0400 > From: Clément Pit--Claudel > > > Some Unicode characters incorrectly increase the height of the line on which > they are inserted, by an incorrect amount (typically 4/5 times the normal line > height). This is due to Emacs falling back to a font for which line height > calculations are incorrect. The problem can generally be reproduced just by > inputing the following characters: > > (𝓝𝓟) > > Alternatively, the problem can be reproduced by switching to certain > specific fonts. For example: > > (set-frame-font "-unknown-Latin Modern Math-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1" nil nil) > > This problem is not specific to 25.0.50. It is discussed on stackexchange [1] > and the effect can be observed in [2]. It only occurs with specific fonts. It > particularly impacts packages that rely on prettify-symbols-mode to display math > symbols; when users install the package, some lines in the buffer start being 4 > or 5 times taller than other lines, although no characters on the affected lines > stand out. For this reason, even if this is likely a problem in the way the > fonts are packaged, it would be nice to have a workaround at the Emacs level. > > Emacs is the only program on my system that displays this behaviour; typing the > same text in gedit or switching gedit to one of the misbehaving fonts, for > example, does not affect the line height. I'm sorry, but I don't see the bug here, at least not a bug I know how to fix. Emacs obeys the information about the glyph sizes that the font supplies; if the font says the font glyphs need more vertical space than in the font used for the default face, then Emacs will enlarge line height. What else can it do? In particular, the ugly effect in https://cloud.githubusercontent.com/assets/2506825/7760973/67ceaaea-ffd5-11e4-8bf6-d796aa162b0e.png is most probably caused by using a font whose Math Alphanumerics block specifies a very large vertical space, to accommodate for superscripts, power, integrals, etc. Just switch to a different font which covers the same block without this adverse side effect. So the only way to fix this (if it really can be fixed) is for someone who knows enough about these fonts to explain (a) why the metrics provided by these fonts are incorrect, and (b) what metrics to use instead and how to compute them. Failing that, there's nothing that can be done here, as Emacs behaves as required and as designed.