From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: position of line moves depending on visible chars Date: Fri, 22 Jul 2016 10:09:15 +0300 Message-ID: <83bn1qxi78.fsf@gnu.org> References: <877fckl7c1.wl@dns1.atmark-techno.com> <83fur82w9v.fsf@gnu.org> <838tx02nlf.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469171421 14573 80.91.229.3 (22 Jul 2016 07:10:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2016 07:10:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Yasushi SHOJI Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 22 09:10:11 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bQUb1-0006CJ-TJ for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2016 09:10:08 +0200 Original-Received: from localhost ([::1]:45483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUav-00020N-P5 for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2016 03:10:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUaB-0001ws-13 for emacs-devel@gnu.org; Fri, 22 Jul 2016 03:09:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQUa5-0004tI-8Z for emacs-devel@gnu.org; Fri, 22 Jul 2016 03:09:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUa5-0004t2-5P; Fri, 22 Jul 2016 03:09:09 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1404 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bQUa3-0006Eo-7f; Fri, 22 Jul 2016 03:09:07 -0400 In-reply-to: (message from Yasushi SHOJI on Fri, 22 Jul 2016 09:01:05 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206010 Archived-At: > From: Yasushi SHOJI > Date: Fri, 22 Jul 2016 09:01:05 +0900 > Cc: emacs-devel@gnu.org > > > The behavior was changed in order to avoid huge line spacing when a > > font reports a preposterously large height. Any option such as the > > one you are talking about will have to keep the new behavior whereby > > the display engine doesn't user the font height for drawing the cursor > > on empty lines, because this will have an even worse effects. > > Are you saying that the change is to workaround bad fonts? Indirectly, yes. The previous code used the font-global size, both for layout of a line with text, and for empty lines. With those "bad" fonts, non-empty lines could be fixed by using the dimensions of the individual characters, but empty lines didn't have even that. So some different algorithm needed to be used, and that's what you see now. I agree that the results are sometimes less than satisfactory, so if someone can come up with a solution that doesn't re-introduce the original problems, I'm for it. > > It's impossible to keep lines at the same spacing when multiple fonts > > are involved anyway, so the situation you are describing is not new. > > Would you enlighten me about this? (A link to bts would be fine.) There are too many bits, unfortunately. In a nutshell, the Emacs display engine determines the height of each screen line and the spacing between them after it traverses all the characters to be displayed on that screen line. Since characters in a line can have different faces, including faces that define use of non-default fonts, the results of this cannot be predicted in advance. For a simple example of what that does start the Emacs Info browser, and look at the chapter and section header lines: they are taller than the rest. > Are you saying that the working Emacs 24 is a pure luck? (having > good fonts?) In a way, yes. Try setting your default font to Latin Modern Math, and see what happens in Emacs 24.5 and in Emacs 25. Bug#20628 has the details.