From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#20628: 25.0.50; Incorrect line height for some fonts Date: Fri, 29 May 2015 22:21:29 -0700 Message-ID: <556948D9.8070409@live.com> References: <20150522.234959.238191883.wl@gnu.org> <556189D0.2000208@live.com> <83bnha1fxw.fsf@gnu.org> <20150524.113203.250674550.wl@gnu.org> <83617i1f29.fsf@gnu.org> <834mn21e7y.fsf@gnu.org> <83y4kaxd25.fsf@gnu.org> <83eglzx0as.fsf@gnu.org> <556824C6.1090909@live.com> <877frr3f3k.fsf@gmail.com> <83bnh3wmmt.fsf@gnu.org> 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 1432963346 10273 80.91.229.3 (30 May 2015 05:22:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 May 2015 05:22:26 +0000 (UTC) Cc: 20628@debbugs.gnu.org To: Eli Zaretskii , Oleh Krehel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 30 07:22:14 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 1YyZDm-0000Vx-L2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 May 2015 07:22:10 +0200 Original-Received: from localhost ([::1]:38382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyZDl-0006jz-RX for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 May 2015 01:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyZDi-0006fY-0C for bug-gnu-emacs@gnu.org; Sat, 30 May 2015 01:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyZDe-0001mv-Ns for bug-gnu-emacs@gnu.org; Sat, 30 May 2015 01:22:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyZDe-0001mp-KK for bug-gnu-emacs@gnu.org; Sat, 30 May 2015 01:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YyZDe-0007LF-7l for bug-gnu-emacs@gnu.org; Sat, 30 May 2015 01:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 May 2015 05:22: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.143296330528188 (code B ref 20628); Sat, 30 May 2015 05:22:02 +0000 Original-Received: (at 20628) by debbugs.gnu.org; 30 May 2015 05:21:45 +0000 Original-Received: from localhost ([127.0.0.1]:32792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YyZDM-0007KX-4j for submit@debbugs.gnu.org; Sat, 30 May 2015 01:21:44 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.24]:49283) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YyZDJ-0007KI-4X for 20628@debbugs.gnu.org; Sat, 30 May 2015 01:21:42 -0400 Original-Received: from [172.20.11.8] ([12.10.78.5]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MgOVK-1YmyL41M06-00Njd4; Sat, 30 May 2015 07:21:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <83bnh3wmmt.fsf@gnu.org> X-Provags-ID: V03:K0:5yfoQukIVMy/QtX2YlCVunxlP6y2F3FCPsS8ld6lL+e1lkx1zJT GJL7TngDGAw+4gf6HO4qV3o4OpaOegGa92O7EM9a7UkHpQ8ViyqDX+5SAvfXwU+RqHIqwJv LIr7/MTliyr8PJOrghoYPd9KqKhThX86IHALgi15tDev9IP0F0uCerEzWwfuWkJ4jMDpoh+ hpq4roVqk0GK2oYK2Vz9g== X-UI-Out-Filterresults: notjunk:1; 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:103338 Archived-At: On 05/29/2015 06:15 AM, Eli Zaretskii wrote: >> From: Oleh Krehel >> Cc: Eli Zaretskii , wl@gnu.org, 20628@debbugs.gnu.org >> Date: Fri, 29 May 2015 11:30:55 +0200 >> >> Clément Pit--Claudel writes: >> >>> The patch partially solves the problem for me, but I noticed a few >>> problems after running (set-frame-font "Latin Modern Math") >>> * When the cursor is at the end of the file, on an empty line, it has a very height. > ^^^^^^^^^^^ > > "Very WHAT height"? "very small" or "very large"? Woops, sorry. Very large height. >>> * The fix seems to only apply to certain characters. The line that I >>> mentioned in my original email, in particular, is still very tall. In >>> other words, when trying the following three lines in a Latin Modern >>> Math buffer, the last line is much too tall: >>> >>> 𝓝 ;; This is still very tall > > I don't see this on my system. Here, it makes the line slightly > higher, and that's all. Perhaps you have a different version of the > font installed. But in any case, if that character still shows up as > too large (a screenshot would be nice), and Emacs uses the Latin > Modern Math font to display it (make sure with "C-u C-x ="), then > there's nothing that can be done about that, since it means the > metrics of the glyph itself, as reported by the font/font driver, are > screwed. If you want to make sure that's the reason, put a breakpoint > on line 26425 of xdisp.c, after the call to get_per_char_metric, as > shown below: > > if (get_char_glyph_code (it->char_to_display, font, &char2b)) > { > pcm = get_per_char_metric (font, &char2b); > if (pcm->width == 0 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > && pcm->rbearing == 0 && pcm->lbearing == 0) > pcm = NULL; > } > > and see what ascent and descent values are reported for that character > in pcm->ascent and pcm->descent. Thanks for the detailed explanation! You were right, the height is fine if the character itself is inserted. The problem is due to prettify-symbols-mode. Thanks for your work on this, it's very cool! This is a bug that had annoyed me 4 or 5 years ago when I first used Emacs, but at that time I didn't really know how to report bugs.