From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Date: Thu, 29 Dec 2022 00:35:56 +0200 Message-ID: References: <80e7f515-e16f-5ce8-86a3-e5f47cd2d2f5@yandex.ru> <2f876c63-d9f5-4dbe-6d82-5d46eb73118d@gmx.at> <8ca8c5c6-c8a1-bf48-a9e6-1e16935de2d6@yandex.ru> <357a553a-7a5d-9bae-f725-14366b07f52f@yandex.ru> <6889e78d-c296-1d5a-a0d3-66ad2b7a6b09@gmx.at> <92bbfa58-b920-04b9-078b-474fd917daf6@yandex.ru> <0c2d9115-8cec-0870-2ac3-38b8c17a0575@gmx.at> <83abf08e-44d9-8a05-f746-5f6a8469ab02@yandex.ru> <503acc7f-8b06-3ce2-71b0-9f97e8de1966@gmx.at> <66cb788c-6b49-c408-0168-0492e7f8d7ad@gmx.at> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40190"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: rpluim@gmail.com, 52493@debbugs.gnu.org To: martin rudalics , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 28 23:37:21 2022 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 1pAf33-000AJq-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 23:37:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAf2m-0007s4-Ag; Wed, 28 Dec 2022 17:37:04 -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 1pAf2k-0007rs-Bh for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 17:37:02 -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 1pAf2k-0003zS-2g for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 17:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAf2j-0000mq-Ob for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 17:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Dec 2022 22:37:01 +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.16722669662948 (code B ref 52493); Wed, 28 Dec 2022 22:37:01 +0000 Original-Received: (at 52493) by debbugs.gnu.org; 28 Dec 2022 22:36:06 +0000 Original-Received: from localhost ([127.0.0.1]:58856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAf1p-0000lU-Pk for submit@debbugs.gnu.org; Wed, 28 Dec 2022 17:36:06 -0500 Original-Received: from mail-wm1-f53.google.com ([209.85.128.53]:38879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAf1o-0000ky-Of for 52493@debbugs.gnu.org; Wed, 28 Dec 2022 17:36:05 -0500 Original-Received: by mail-wm1-f53.google.com with SMTP id fm16-20020a05600c0c1000b003d96fb976efso9924915wmb.3 for <52493@debbugs.gnu.org>; Wed, 28 Dec 2022 14:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=dHVy0CDdGVSWoug/ZJoh9rBGL8tYLWvNUzazjQQBN/Y=; b=XSqQejP1hBWApS0zG4hvQb5wdVAdulxh8s3UOQ5qVNF64GkWLnG4K9tBjZsn3VFQ6X UQYITl8RSZiUr1bXaX9yGP3iztOU7LPiJ0BOtApzoXBC5o22TJsvGwNCBs/26BFTK78O SZBxThg4k7ur3Qt8VxQ1QkDJ4o9Jjuz73VYZyoBygAt5AOVpCF5J/55TgZmyleO+kWJ6 4niaxETFdEpd6e1ABBNd3b72e71KFwpPvj7tb0fkj6yY96J3UV/XCuQiL6pMJ3/aYwQi HmuqnP4nESHH/M8B/kilVMQjCjMkffWTS2rqEKIqNMdxA6ONpCVEJxmWbq3lSZ4+FWLJ D1vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dHVy0CDdGVSWoug/ZJoh9rBGL8tYLWvNUzazjQQBN/Y=; b=RYsUkW6Arkm58b6qlifMXvrZu1wOs41X906Cr1VoiNwgKZrcQC+/OluQrAMwHyibqU D91hA2Ag0bSRLeTfIix0kuVgsHt31eqRH0fZ+FgnRryW8h9po5vuCtJ3PEyri7mRK2Di tV8FQd2oFs5dK0oz8JCv9jsS4w47UPyyahbqY6tvp1yQQ102NQeaOt1mI+oO5YNS3+A0 smPZAjpOW+fIsjCvocXVTcPDMFPGGWQHpE69yjXTDhJh0KP9A6DjDjIy7AhtWRlNuR92 x11MRAP95m/Ag19S3ByNn6iGeJgs85cUz/aTT0ZAyp13v/d8XgMMYg2+hw7vdAl25s2+ f+/Q== X-Gm-Message-State: AFqh2kp2tFsVcempKaoNh0aoCG6mfJ4slf3+1NJ5ggmV7WXEi0zSYjlw JCqvl8zncb3hal8Q+JG8DJc= X-Google-Smtp-Source: AMrXdXuH6ai/vxzH1RLE9FLi9GOgufZAqPLOnrQngtb7OJ9CojDDV6tvYpb1Wcwxsp44Ikz6x4f/fA== X-Received: by 2002:a05:600c:34d4:b0:3cf:a39f:eb2a with SMTP id d20-20020a05600c34d400b003cfa39feb2amr18662897wmq.11.1672266958550; Wed, 28 Dec 2022 14:35:58 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o27-20020a05600c511b00b003c6f8d30e40sm29317463wms.31.2022.12.28.14.35.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Dec 2022 14:35:57 -0800 (PST) Content-Language: en-US In-Reply-To: <9bc9f6fe-4fe6-1f75-42db-3a9c3e84d851@gmx.at> 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:252003 Archived-At: On 28/12/2022 19:35, martin rudalics wrote: > > It certainly does work. One of the changes I saw right away is the > > width of the frame right after startup with my config increased from > > 84 to 90 columns. > > What are you asking for in your configuration? With your latest patch it's slightly different (the max width is 84). But what I'm also seeing, is that even without your patch the starting frame width is not deterministic either: the frame resizes a few times during loading, and may end up at width either 80 or 84. I think I mentioned similar behavior in some other bug report too. So it seems like your latest patch doesn't change this behavior in any significant way. Still either 80 or 84, at random. > > Not sure if it's good or bad, so let's go back to > > the behavior with '-Q'. > > > > The height stopped shrinking. > > > > The width started growing. :-D > > Repeatedly? Yup. Without limit. > > I don't know if *foo* is helpful here yet, but here you go: > > Not for the width.  But that's another issue.  If mutter complains about > the width not conforming to the (+ base_width (* width_inc N)) rule, > then we have already lost when the sum of fringes and scroll bar is not > a multiple of the frame's column width.  Which means, you get a "wrong" > size without any scaling and you may be lucky if that scaling does not > propagate during further 'set-face-attribute' calls.  Does each setting > of 'set-face-attribute' increase the width or is it just the first one? Every one (at certain starting widths), just like it was with the shrinking of height. > Strictly spoken, Emacs is wrong here and mutter is right.  But fixing > this is quite involved since we'd have to disentangle those insane > FRAME_TEXT_COLS_TO_PIXEL_WIDTH and FRAME_TEXT_LINES_TO_PIXEL_HEIGHT > macros into xg_frame_set_char_size which would constitute a real pain. > More precisely, we'd have to treat scroll bars, fringes and internal > border like menu and toolbar and count them into the base_width value. I'm sure you are right, but before we continue the thorough investigation, do you have any idea why (set-face-attribute 'default nil :height 110 :family "InconsolataLGC") exhibits this kooky behavior, while (set-face-attribute 'default nil :height 110 :family "Inconsolata LGC") does not? That might point to a weird kludge or workaround somewhere which just needs moving somewhere else. > Try the attached which should work for any scaling and tell me what > happens now - in particular what the initial frame size is and whether > the frame grows or shrinks repeatedly. Now the width shrinks. Not from all starting widths, but from many of them. Suppose the starting width is 80 (that's what frame-text-cols returns). Evaluating the set-face-attribute form changes the frame size once, but not the width in columns. Successive invocations don't change the frame size. I increase the frame to width 112 with a mouse. Doesn't shrink. 111-108 - nope. I resize it to 107 (according to frame-text-cols; the wm reports 109x36), and evaluating the form shrinks the frame by 2 columns. That repeats until frame-text-cols is 96. Widths 96-92 don't shrink. I resize to 91 - it continues shrinking (in steps of 2) until 80. 80-76 don't shrink. 75 - shrinks until 64. And so on.