From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Date: Tue, 10 Jan 2023 13:05:54 +0100 Message-ID: <32ac6060-a7ed-a0c4-1c62-f0e1804d963d@gmx.at> References: <80e7f515-e16f-5ce8-86a3-e5f47cd2d2f5@yandex.ru> <266ad500-da74-13a5-2434-81bd3d5b3554@yandex.ru> <66499633-3283-3cb2-2322-77a357a3c1b7@gmx.at> <1c8f744b-2c71-d6b3-39be-86185ea3650b@yandex.ru> <9bc9f6fe-4fe6-1f75-42db-3a9c3e84d851@gmx.at> <8bca33d8-55a5-9a96-2adf-cc751eed22e5@yandex.ru> <21a55a64-541d-345c-33d3-7c8eac182e83@gmx.at> <89a94819-8bdf-55a3-9167-0cc8d11215ee@yandex.ru> <9be7030e-ce19-0baa-58b8-e2d483efab8f@gmx.at> <8df08d50-146f-9b76-efa0-ba101e53e7c0@yandex.ru> <29bd2735-5070-915c-e236-9de0c6dcbb1f@gmx.at> <921de89e-57e0-04de-3e91-043b49503d10@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8JjiIbWiOGz6abEUI0KvZVEq" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20556"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, 52493@debbugs.gnu.org To: Dmitry Gutov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 10 13:07:30 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFDPd-00059l-HT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Jan 2023 13:07:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFDPF-0002p9-So; Tue, 10 Jan 2023 07:07:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFDPD-0002o4-SO for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 07:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFDPD-000359-E2 for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 07:07:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFDPC-0000zb-FJ for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 07:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Jan 2023 12:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52493 X-GNU-PR-Package: emacs Original-Received: via spool by 52493-submit@debbugs.gnu.org id=B52493.16733523683734 (code B ref 52493); Tue, 10 Jan 2023 12:07:02 +0000 Original-Received: (at 52493) by debbugs.gnu.org; 10 Jan 2023 12:06:08 +0000 Original-Received: from localhost ([127.0.0.1]:39018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFDOK-0000y9-8k for submit@debbugs.gnu.org; Tue, 10 Jan 2023 07:06:08 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:38051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFDOG-0000xW-FG for 52493@debbugs.gnu.org; Tue, 10 Jan 2023 07:06:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1673352355; bh=+nT0TT7oYGgxXDM5xUM7Er687vjONwOvWzY34cVLCps=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=kHWErS+Ch1G6vZn6qUdGr0SyZI49SBuw0uHz98GlqyD9ULAHjSPz0kug+o5s3n0sP ZExXfa8Ckd5vxaEHAuyc6+pRA3PuI7RddvdJrv5P+vv259U1F22tfS38qhqKlzEgss hGetXSibtosITATjPXnlyt6PB2OQDuhRekbwaMVnHvSei24f39QKL0XVsC67fsuubV BD7QAl18KnrR8CYG8S0HuiLIluGCbGZcuX9PpoKE0wxpiFLizqZr44vT0Vr5Go6+xC qR3AAQScz359uiNswnQoyBKOgMNINjyaOITmxKteHqjAi8QnwBzrAJ6IsjuFG6s0GL FtjdFxYIfvqiQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([212.95.5.144]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7zFZ-1okmSu2Ez5-014zfR; Tue, 10 Jan 2023 13:05:55 +0100 Content-Language: en-US In-Reply-To: <921de89e-57e0-04de-3e91-043b49503d10@yandex.ru> X-Provags-ID: V03:K1:+1RRiX9fa7zaiLT165XoLPqT4ZByzfY6nHQFBowiCGnuLIlOZ4p eKaul8Zm2iTCWGGHp+mvpqxzdVxNcN7kvTq2iTMLIKzxcJgPeXRB22l6vw3nLFrl50OanVT fSPxXz+qISuMe1ZjPanPwYk1xlVVB91w5l8HsQQv385kcakF/WBdK5PCTW+4Zqleqd0fMKI IA8gVLpFy/kQDtklKG0rg== UI-OutboundReport: notjunk:1;M01:P0:GBB4hqMTJCs=;cWWY/9sOb9dU4g4S6h7pxUJsZ4J FX2seL8Je+hZw5RGNv0xF4lgtG8YZCglpO+aPqZlTpJKCXHTa+/wjuY2htmonJDBQbCqoSECM aT4035JKMmHvdlMzANUxJb+XZEgYaLVUEoXy9UDa7EP1gGhP6Ir7q4+tRrz+RfWNdUVTeVfya JMDBmViyQ3y7eVmbSY7cP6rYd5SNmgN41+26aCD8odTKBEf3Gv6j3tLWClbK78zojn/JHwZhU gfXa/ewXWm4sKZ4xSqxch3hvFdLDDu4VQzdAcFiUmB1TxIhYCS2D1jXMs2L51BoRlf9m/GE4J aPRpT4r6+yFSd+ddBIESivaAxpcYeJcNbEljiIFRNIwDTcXAAaB2caJ85qpsdaUmknnRlPmIe dRrdZ3wNQn26mejUv0S93S9LTe1R4NQDKpabORuYluWN08NasxhLtsASBRHqEyDTN7oeazFgS AQGbOEzd2vd78INHcBhhIOrIuPKJjLxvGF6dGVguMBoXZpBICvDD99+N3VuntTK0mSRxk+kE3 cx3XtLi7NVYg+x1ZnuRC34xPoQJe8jpbs9W5EjdO4mMpSiq8xI4tRAcv5yj92fNjRYcYhEVzH plZg5hF1DRc9q1pFPMX5Nfq0Ljt80mh1UA9nik38b7e87LNZ0iAdhtjb9/DABZqqhQvczs84Q EoIVQtbvRBbqpiSjfghhusV962EVDAYDmxTWNMIQ17/oU+PWgoU6xan3m4Sy1A+VAVIp8HW/Z eqs9lt4iE24TZltzUEyAKSklLi5lVE1mCknWuNCaf02bkQqaIrlowSs5NT7xG+YQLm1x1jpE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253069 Archived-At: This is a multi-part message in MIME format. --------------8JjiIbWiOGz6abEUI0KvZVEq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit >> Here, for example, a maximized frame does not have the "right >> height". > > Yeah ok, but none of the frames were maximized in those scenarios. I mentioned it because that's how it usually can be reproduced easily with emacs -Q. > And the resizing by mouse "snapped" to the provided grid. The resolution of that grid is specified by Emacs via these four lines size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f); size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f); size_hints.width_inc /= scale; size_hints.height_inc /= scale; If you scale by 2 and you have a font with impair sizes, you lose one pixel and the grid will be smaller than the character size. If we round up in the last two lines, the grid will be larger than the character size by one pixel. If we do not scale, the grid will have a resolution of two characters. What would you prefer? > I'm probably out of my depth here, but with 2x scaling, shouldn't the > height increment just be 2x larger than the original one? If N is > integer, 2xN must be an integer as well. You're scaling down whatever you display probably because otherwise displayed objects would appear to small for your eyes. That is, while Emacs lives in a 4000x2000 pixels world say, it's presented to your eyes in a 2000x1000 pixels form. > Pixel dimensions do change in this scenario. But not the reported text height. Right. That's what rounding is all about >> xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368 >> adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36 >> xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332 >> adjust_frame_size old native pixels 1408x1368 new native pixels 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36 >> >> represent two mouse operations that resize the frame by 16 pixels, first >> the width, then the height. Both are less that the character size so >> while again the size of the frame should have changed, the numbers of >> text characters didn't. > > The frame size didn't change either, however. That's not what the numbers say. The first time, the width changed from 1424 to 1408 pixels. The second time, the height changed from 1368 to 1332 pixels. > All right. Where do we go from here? I think you should use the attached in your daily work. It's the same as before with the tracing code omitted. If there are bigger problems, use the former patch and post me the contents of *foo*. > The usability problems remaining are very minor, so if you're saying Emacs is going right thing, we might as well go with the latest patch and call it a day. Thank you. Note that I won't install anything in the near future because I've given up synching with the repository. The last time I did, I spent a couple of weeks to fix whatever got broken here. martin --------------8JjiIbWiOGz6abEUI0KvZVEq Content-Type: text/x-patch; charset=UTF-8; name="x_scale_font_only.diff" Content-Disposition: attachment; filename="x_scale_font_only.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9ndGt1dGlsLmMgYi9zcmMvZ3RrdXRpbC5jCmluZGV4IGE2YmJh MDk2YTQuLjE2NzMyOWNjYjggMTAwNjQ0Ci0tLSBhL3NyYy9ndGt1dGlsLmMKKysrIGIvc3Jj L2d0a3V0aWwuYwpAQCAtMTE3NCw2ICsxMTgyLDcgQEAgeGdfZnJhbWVfc2V0X2NoYXJfc2l6 ZSAoc3RydWN0IGZyYW1lICpmLCBpbnQgd2lkdGgsIGludCBoZWlnaHQpCiAgIGludCBvdXRl cl93aWR0aCA9IHdpZHRoICsgRlJBTUVfVE9PTEJBUl9XSURUSCAoZik7CiAgIGJvb2wgd2Fz X3Zpc2libGUgPSBmYWxzZTsKICAgYm9vbCBoaWRlX2NoaWxkX2ZyYW1lOworICBpbnQgc2Nh bGUgPSB4Z19nZXRfc2NhbGUgKGYpOwogCiAjaWZuZGVmIEhBVkVfUEdUSwogICBndGtfd2lu ZG93X2dldF9zaXplIChHVEtfV0lORE9XIChGUkFNRV9HVEtfT1VURVJfV0lER0VUIChmKSks CkBAIC0xMTk2LDggKzEyMDYsNDIgQEAgeGdfZnJhbWVfc2V0X2NoYXJfc2l6ZSAoc3RydWN0 IGZyYW1lICpmLCBpbnQgd2lkdGgsIGludCBoZWlnaHQpCiAgIC8qIERvIHRoaXMgYmVmb3Jl IHJlc2l6ZSwgYXMgd2UgZG9uJ3Qga25vdyB5ZXQgaWYgd2Ugd2lsbCBiZSByZXNpemVkLiAg Ki8KICAgRlJBTUVfUklGIChmKS0+Y2xlYXJfdW5kZXJfaW50ZXJuYWxfYm9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