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#37473: 27.0.50; antialias setting is not preserved by, inheriting Date: Thu, 30 Jun 2022 09:17:07 +0300 Message-ID: <83fsjm65gc.fsf@gnu.org> References: <466d6eb8-b02f-9e49-6c79-95c5fa3d7252@orange.fr> <83k09cmpn6.fsf@gnu.org> <87wndcxipc.fsf@yahoo.com> <837d5bmtso.fsf@gnu.org> <875ykvo7bd.fsf@yahoo.com> <831qvjmq5h.fsf@gnu.org> <87y1xrlbee.fsf@yahoo.com> <83y1xrlalf.fsf@gnu.org> <83wndbl90a.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28806"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, da_vid@orange.fr, larsi@gnus.org, 37473@debbugs.gnu.org, monnier@iro.umontreal.ca To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 30 08:26:45 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 1o6ndU-0007Kj-76 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jun 2022 08:26:44 +0200 Original-Received: from localhost ([::1]:45886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6ndS-0005ag-Ue for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jun 2022 02:26:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6nV4-00008v-TF for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 02:18:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6nV3-00015t-R6 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 02:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o6nV3-0004Wa-N1 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 02:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jun 2022 06:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37473 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 37473-submit@debbugs.gnu.org id=B37473.165656983017319 (code B ref 37473); Thu, 30 Jun 2022 06:18:01 +0000 Original-Received: (at 37473) by debbugs.gnu.org; 30 Jun 2022 06:17:10 +0000 Original-Received: from localhost ([127.0.0.1]:60836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6nUD-0004VG-OG for submit@debbugs.gnu.org; Thu, 30 Jun 2022 02:17:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6nUA-0004UN-E9 for 37473@debbugs.gnu.org; Thu, 30 Jun 2022 02:17:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6nU4-0000v1-1c; Thu, 30 Jun 2022 02:17:00 -0400 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=ODkG/m4ALt7vFW3kkBRywxBGq1YuTMSrGjC9wwKIDYw=; b=g83n4kQWbOUi LZJDtS4bBrPa+WbeVu0QnfChkYNCCIDyXIEVYIG5kpXIN4x6ve0HLOM8PcCJkUyYy+8S7YyEIKfon 8beWeT/M5FGGd0ERPXlEM/A/LRBCi0ZC8SYiZWBohgEuABjNS4LzcaIihlyGuoj4HetnTor0EMpyD rH+uPgBtuFtacowGE9nYmvKIuCPlhr+uEPem+qCtHsgo34GRw5eBO+lV2ajNDjl5v0VFf/57RW5WX r6AhrU42wKeKWzNA2EZadE7JAFjxOA2FVwZMXcqBX4Ec3+mU2TNKdDutIl1fV4JEXnwXBIhaXfBhs fkq5DjYmM68pWG/7XPh9rg==; Original-Received: from [87.69.77.57] (port=2903 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 1o6nU3-0001Xs-FF; Thu, 30 Jun 2022 02:16:59 -0400 In-Reply-To: <83wndbl90a.fsf@gnu.org> (message from Eli Zaretskii on Mon, 20 Jun 2022 17:11:49 +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:235691 Archived-At: Ping! Kenichi, could you please chime in on this issue and help us resolve it? > Date: Mon, 20 Jun 2022 17:11:49 +0300 > From: Eli Zaretskii > Cc: da_vid@orange.fr, 37473@debbugs.gnu.org, > Stefan Monnier > > > Cc: handa@gnu.org, larsi@gnus.org, 37473@debbugs.gnu.org, da_vid@orange.fr > > Date: Mon, 20 Jun 2022 16:37:32 +0300 > > From: Eli Zaretskii > > > > > From: Po Lu > > > Cc: handa@gnu.org, da_vid@orange.fr, 37473@debbugs.gnu.org, larsi@gnus.org > > > Date: Mon, 20 Jun 2022 21:20:09 +0800 > > > > > > Eli Zaretskii writes: > > > > > > > ??? The original bug report talked about antialiasing, but it didn't > > > > say that other attributes in the :extra property don't exhibit the > > > > same issue. > > > > > > They might, but apparently :antialias is the only one to have caused > > > enough of a problem for someone to open a bug report. > > > > > > I guess copying the entire extras alist would work too, if that's what > > > you would prefer. > > > > Yes, I think that's what we should do, at least as long as the > > solution is based on this technique. > > Actually, why not go to the code we had in realize_gui_face before > commit bf0d3f7? The problem described in bug#1793, which led to that > commit, only happens if one uses a specific (misc-fixed) font family, > not for the usual default fonts used by Emacs, and I'm not sure what's > described there is a bug at all. At least for the purposes of > text-scale-adjust, it makes no sense to ignore the > foundry/family/adstyle of the original font, because we _want_ the > same (or very similar) font, just of a different size. > > And likely in other use cases: if the :font attribute of a face > specifies some font properties, we want to keep them all, not > arbitrarily to ignore some of them. And definitely catering to an > obscure use case such as the one cited in bug#17973 is NOT a good > reason to make such radical changes in face-realization behavior. > > So I think we should just back out that part of commit bf0d3f7, and if > we decide that this causes bug#17973 in too many situations we care > about, I'd rather find a kludge for that specific case than do that > for every face realization. > > Specifically, I propose the change for the master branch. Any > objections? > > diff --git a/src/xfaces.c b/src/xfaces.c > index f70fe87..10bde40 100644 > --- a/src/xfaces.c > +++ b/src/xfaces.c > @@ -5952,28 +5952,8 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] > emacs_abort (); > } > if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) > - { > - /* We want attrs to allow overriding most elements in the > - spec (IOW, to start out as an empty font spec), but > - preserve the antialiasing attribute. (bug#17973, > - bug#37473). */ > - temp_spec = Ffont_spec (0, NULL); > - temp_extra = AREF (attrs[LFACE_FONT_INDEX], > - FONT_EXTRA_INDEX); > - /* If `:antialias' wasn't specified, keep it unspecified > - instead of changing it to nil. */ > - > - if (CONSP (temp_extra)) > - antialias = Fassq (QCantialias, temp_extra); > - else > - antialias = Qnil; > - > - if (FONTP (attrs[LFACE_FONT_INDEX]) && !NILP (antialias)) > - Ffont_put (temp_spec, QCantialias, Fcdr (antialias)); > - > - attrs[LFACE_FONT_INDEX] > - = font_load_for_lface (f, attrs, temp_spec); > - } > + attrs[LFACE_FONT_INDEX] > + = font_load_for_lface (f, attrs, attrs[LFACE_FONT_INDEX]); > if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) > { > face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]); > > > >