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#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: Re: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Date: Mon, 20 Feb 2023 10:05:16 +0100 Message-ID: <212de935-52bc-9516-9a36-40e5ccd8c824@gmx.at> References: <80e7f515-e16f-5ce8-86a3-e5f47cd2d2f5@yandex.ru> <67b92c69-f456-0d31-c7b2-83600cc12f61@yandex.ru> <936558fd-5c6e-f575-7211-3d6a14f8febd@yandex.ru> <46994f90-a8ab-7797-73f6-51af01759fb1@gmx.at> <661a804a-ad05-81f8-1aa0-b83811a0576c@yandex.ru> <9c02c0b0-9b96-7d46-37ae-a258a9496891@gmx.at> <3ba27f8c-779a-6f29-45a1-2b7e5a4dcb14@gmx.at> <0144e9a3-57ab-6549-d382-744b141066ec@yandex.ru> <90b5e151-39d1-0248-7be5-8084d8883e5f@gmx.at> <309dcf34-b553-58c2-34a5-270028b05347@yandex.ru> <8913f7e5-5509-3a8e-7413-991b404c3e4e@gmx.at> <4826afb4-e4a7-3845-4cc4-c696123b5e8d@yandex.ru> <90779967-1542-9c5f-c064-f4fca8eabcc2@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25736"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60585@debbugs.gnu.org, rpluim@gmail.com To: Dmitry Gutov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 10:06:24 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 1pU27r-0006WJ-Me for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 10:06:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU27g-0001nK-AW; Mon, 20 Feb 2023 04:06:12 -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 1pU27W-0001el-US for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 04:06:05 -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 1pU27W-0002I5-ED for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 04:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU27V-0001NA-Tx for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 04:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 09:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60585 X-GNU-PR-Package: emacs Original-Received: via spool by 60585-submit@debbugs.gnu.org id=B60585.16768839305227 (code B ref 60585); Mon, 20 Feb 2023 09:06:01 +0000 Original-Received: (at 60585) by debbugs.gnu.org; 20 Feb 2023 09:05:30 +0000 Original-Received: from localhost ([127.0.0.1]:50477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU26z-0001ME-VJ for submit@debbugs.gnu.org; Mon, 20 Feb 2023 04:05:30 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:51437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU26w-0001Lz-Hc for 60585@debbugs.gnu.org; Mon, 20 Feb 2023 04:05:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1676883919; i=rudalics@gmx.at; bh=TKkimu3BzEBK2s5F61Uo3AkWuKHt5XERD9b9G4+NaWs=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=UdlrwZubfkl4LOuOnOr0L5CXuifFSivTNHx08E3jzsxj0Jfs3CdTMJVLM0NgG36to 7KEf65LIEiXSSq8JJWExiR9NTbSQrwCw2S8gHDnYbWBbxi1gwFlStK5VRsEKH+4wRG PsxtI9JkA4HvgqNpD295ZBI128P7QtxKJKyA10NeaBR3YGp4OmYi4DPE95cJv+lmSB fbPZI1VU4EKCUgtpnK0YZRa2Lh36qdcQBWwS3GXFrWSCcqYHTMJnn4SHQj0E/kC5Hs e8v+dIja9K5J9QQirNZZ7f9iTuhhK3ggJv3F57jNu82430ItdjblglVJVfNOQqLfvC sCbXZaUemzoeQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([46.125.249.87]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mz9Ux-1oYCGT3QId-00wCrC; Mon, 20 Feb 2023 10:05:19 +0100 Content-Language: en-US In-Reply-To: <90779967-1542-9c5f-c064-f4fca8eabcc2@yandex.ru> X-Provags-ID: V03:K1:c3zrIFtb34QL4nOERgXWFW8BELiPibKNILvhbH2cOckgCBxJfH8 TdG3tIFvytdwCpxJ1O87syyjtBpxcM6Gs3QdMGn0WZIyVm6IEFrwi+bIYcQXyTyFatN6JFI K8SzXfru/X+MnhbbmZ9dWKJ7OeyoUNXwiDk3SQsBW3T2anenvI6kIH2QDXwEbFuqhs7gGic TP60tKu+u7Zdu1scgsXjQ== UI-OutboundReport: notjunk:1;M01:P0:o8iUFQj7DN4=;XGZbwiGyfbKV0yPFI+V90lVpW3q wJN85E5dWcaytm3SRyoRVcEqr3RGc82hgIJ7+m6ObYmjKb5gcGEQYz7OpgbYSQH8PARSbO5r0 0YtWC/VHZg5DgGkyqOhqmnYKhAwJ8Hcaa0nQ7pJdToBfWy1wbBSNACwfm/9n288y16YMAkDf+ JBoxUM12Jgjd7RAaK2eJP2g77aIEcI2gxrJi9sm7VLFp0whRejCFF40KWzs1P7VE+u1V/NI0S gAMStLLsxC2vOBMwhCPMTPKeDe30E1tdhtrgCyt2VHWc7vJYX3TPAwAD7FMLcPD0yNVxGmPm8 WnAod88tPoUBcE2WE8o8cfm8OCio+B9GS21G1NyYTc1pauc6vCAu4ABc5uxTvvYfubHSM6JCy W7ohyKHYR7qNeoX8VnBI/zMJ3f6DcvPK1hq2x+CiONuJJ2kx8VT7j8h5R+rSRoECmWPxz3k4S dA4BpfhbUGWPmTHf4AP2IlnorUZyvucFarimbXrh3cxun9s/GWjqh9SOHeDuDDngadIhuK6nh mRpqb+OgvC2C10HIO2XlTPjC5HTEdawhNwaQnbu7uAd1CNfyklU0Mc1oyhyDgMvVQ6Vj9RbC8 MpNk6z4k7TFEkUVfx1jV0rIhk0xzyAhULlMMaYXKDrWQ97qKWh/Dasu/9Si7mR2VmZ02+4fij biEjjL55+olW07HQ3bEwG+taTosvFI+5VxTGE8QLQod5J2/Pssez+O2szb1lp8daCAFCsUcmC XGqU0gGyyiorq3LLc4J/OVPClB56KYYktTMiJSaop8Yqc/3yegM2m/d4loVHncSbTkEXrrIN 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:256134 Archived-At: > It becomes ever more difficult to remember the context. E.g. which > operations I should do with each build before looking up this or that > value. Same here. In fact, I think we have investigated most of what can be done here. So unless someone has a better idea I'll try to come up with a patch that comprises most of what I sent you so far and some further fixes - size hints on xfwm have become off by one here and I don't yet know what causes it. So as a general guideline I plan to cook up something like: - Make the base size hints handle any irregularities caused by increment hints not being integral multiples of our line/column sizes. - Implement correct minimum size hints and make them independent from the base sizes. - Do away with our attempts to override GTK which means to get rid of emacsgtkfixed.c/.h. All this will take some time and testing. > These logs are of 'emacs -Q' followed by evaluating > > (set-face-attribute 'default nil :height 110 :family "InconsolataLGC") FWIW, it would be nice to get the 80x36 and 84x36 below adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36 base_size 32x84 size increments 8x18 WM hint 84x36 in synch but I have no clear idea yet how to do that. IIRC I added the last line to that comment in gtkutil.c /* Use one row/col here so base_height/width does not become zero. Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. Obviously this makes the row/col value displayed off by 1. */ some time ago but am not sure whether it explains the problem in its entirety or something else has to be done too. >> I see. BTW, your Lucid scroll bar doesn't seem to have a ruler (or >> thumb, or whatever you call it) nor the arrows at top and bottom. > > Indeed. Not sure if it's supposed to. > > The scrollbar itself is not very functional: it shows the scroll > progress of the buffer, but to scroll back using the mouse clicks > seems impossible (all scrolling proceeds in one direction). Are these toolkit scroll bars? What are your build options for Lucid? Whatever it is, this behavior deserves a separate bug report. > First call for "InconsolataLGC": > > x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620 > xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10 > char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22 > xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0 > base_size 34x106 size increments 10x22 WM hint 83x35 > xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620 > adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36 > base_size 34x106 size increments 10x22 WM hint 83x35 > > x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332 > xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8 > char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18 > xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0 > base_size 32x84 size increments 8x18 WM hint 84x36 > xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332 > adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36 > base_size 32x84 size increments 8x18 WM hint 84x36 > > The second and all subsequent ones look like this: > > x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332 > > x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332 > > (This is while keeping the frame in its default size; no resizing with the mouse.) All these show no differences between the two Inconsolatas. So the reason why one keeps your frame shrinking and the other doesn't still remains a mystery. > It looks like both trigger two x_new_fonts calls the first time. And maybe resize the frame twice, which could be hard to register with the human eye. But then one continues to do that (under certain conditions), and another stops. > >> It should be something like not finding a suitable >> font with "InconsolataLGC" or at least one that does not ask for >> changing the height > > That's what I was thinking: "InconsolataLGC" falls back to > "Inconsolata LGC", but that's not registered in some internal data > structure, so whenever a new set-face-attribute call arrives, the > comparison fails, and the search is repeated. You could try with two separate 'set-face-attribute' calls. That is: Do the below for both Inconsolata fonts > InconsolataLGC: > > first hit: > > (gdb) p font->average_width > $1 = 21 > (gdb) p font_ascent > $2 = 37 > (gdb) p font_descent > $3 = 8 > > second hit: > > (gdb) p font->average_width > $4 = 17 > (gdb) p font_ascent > $5 = 31 > (gdb) p font_descent > $6 = 6 > > Inconsolata LGC: > > Exactly the same. first with only :family set leaving :height alone and then with only :height set leaving :family alone. Then do the reverse - that is first with only :height set leaving :family alone and then with only :family set leaving :height alone. martin