From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Date: Thu, 16 Dec 2021 09:29:24 +0200 Message-ID: <83a6h1husr.fsf@gnu.org> References: <80e7f515-e16f-5ce8-86a3-e5f47cd2d2f5@yandex.ru> <83k0g5j4pi.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="341"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52493@debbugs.gnu.org To: Dmitry Gutov , Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 16 08:30:58 2021 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 1mxlE9-000AO3-RC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Dec 2021 08:30:58 +0100 Original-Received: from localhost ([::1]:35560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxlE6-0006nl-5M for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Dec 2021 02:30:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxlDO-0006nX-Tw for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 02:30:10 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxlDG-0008HL-Nj for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 02:30:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxlDG-0000da-HY for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 02:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Dec 2021 07:30: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.16396397922411 (code B ref 52493); Thu, 16 Dec 2021 07:30:02 +0000 Original-Received: (at 52493) by debbugs.gnu.org; 16 Dec 2021 07:29:52 +0000 Original-Received: from localhost ([127.0.0.1]:34382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxlD5-0000cp-IQ for submit@debbugs.gnu.org; Thu, 16 Dec 2021 02:29:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxlD2-0000cY-HR for 52493@debbugs.gnu.org; Thu, 16 Dec 2021 02:29:50 -0500 Original-Received: from [2001:470:142:3::e] (port=52596 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxlCx-0008F9-0c; Thu, 16 Dec 2021 02:29:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RNHvH8dsCcv2J7Nzll176oTI3jvYF2Rte0eBQMJ93H0=; b=HoZtZA1a3eNA 0XjPYYhjJflCGujq2udvpDveemINfS1iIyFduTAA/BxpwVocEbzINHi4lVP1mZ1ZxZpMD5g/PnsPw jK3opE/xm+W73E4egxSgsLmqK4jnlsXMQxO/rOgkUmawBqyZVGtdDs1gV4DIW+5qme5GZZLX13ASz o3YkBs1nxMz1GvsUz40c5f8uoF7BtG2u4hRHArCyNB4Y4O+OEC9CHG6a3UIXnRHh1ZNBBiBTGfmcg geOEN7xLg+1hgPBBD8FOMkTQcOFYim1zw+hlvAo2oTDLvqCdi8Tz9dB+b7ZaCkgHEm1mnx46+jnEl oe02hXEfmUffecZF0kqF1w==; Original-Received: from [87.69.77.57] (port=4827 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxlCw-0002Z7-NP; Thu, 16 Dec 2021 02:29:43 -0500 In-Reply-To: (message from Dmitry Gutov on Thu, 16 Dec 2021 01:43:31 +0300) 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" Xref: news.gmane.io gmane.emacs.bugs:222464 Archived-At: > Cc: 52493@debbugs.gnu.org > From: Dmitry Gutov > Date: Thu, 16 Dec 2021 01:43:31 +0300 > > >> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz") > >> > >> See the attached screenshot with comparison (master is on the left). > > > > Indeed, weird. What does the below show? > > > > M-: (face-font 'default) RET > > > > after you evaluate the above in "emacs -Q"? > > "-DAMA-Ubuntu Condensed-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1" > > So... not the right family and it's "condensed", for some reason. > > For comparison, > > (set-face-attribute 'default nil :height 110 :family "Ubuntu") > > results in > > "-DAMA-Ubuntu-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1" > > And by default (without any set-face-attribute calls), > > (face-font 'default) evaluates to > > "-DAMA-Ubuntu Mono-regular-normal-normal-*-35-*-*-*-m-0-iso10646-1" > > > And how does it differ > > from the same in a version of Emacs that predates the changes of the > > mode-line face? > > Current emacs-28 returns > > "-PfEd-Inconsolata_dz-normal-normal-normal-*-29-*-*-*-m-0-iso10646-1" > > Regarding "version of Emacs that predates", I wasn't sure which commit > to pick exactly, but 756b8a5f1bd28aeadc804 also returns that value, and > doesn't have the described problem. > > > Also, what happens if you invoke Emacs like this: > > > > $ emacs -Q -fn Inconsolata_dz > > It doesn't look as narrow, and (face-font 'default) evaluates to > > "-PfEd-Inconsolata_dz-medium-normal-normal-*-32-*-*-*-m-0-iso10646-1" Thanks. I think this means that Emacs 29 on master now rejects the Inconsolata_dz font for some reason, or thinks it finds a better match. The fact that it picks a condensed family is probably secondary; the main issue here is that the font family you requested is rejected. Does that family have the regular weight? If not, maybe that's the reason it is rejected, and you need to also require some specific :weight value in your set-face-attribute call. Also, maybe running $ FC_DEBUG=1282 emacs -Q will give us a clue of what happens. See https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG for where I took that weird value. Robert, any other ideas? If this doesn't help, I'm afraid the only way forward is to step through the code which selects a font when you specify the family for the default face, and see what happens there and why.