From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.bugs Subject: bug#37473: 27.0.50; antialias setting is not preserved by, inheriting Date: Sun, 19 Jun 2022 19:28:19 +0100 Message-ID: <87mte8bj98.fsf@yandex.com> References: <466d6eb8-b02f-9e49-6c79-95c5fa3d7252@orange.fr> Reply-To: m43cap@yandex.com Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32760"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 37473@debbugs.gnu.org To: David Ponce Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 19 20:29:23 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 1o2zfn-0008R9-Ln for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Jun 2022 20:29:23 +0200 Original-Received: from localhost ([::1]:50530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2zfl-0003jr-T3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Jun 2022 14:29:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2zfS-0003jj-AK for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2022 14:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2zfS-0004Jd-1W for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2022 14:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2zfR-0007z4-QL for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2022 14:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Colin Baxter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jun 2022 18:29: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.165566331530654 (code B ref 37473); Sun, 19 Jun 2022 18:29:01 +0000 Original-Received: (at 37473) by debbugs.gnu.org; 19 Jun 2022 18:28:35 +0000 Original-Received: from localhost ([127.0.0.1]:53163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2zf1-0007yM-Da for submit@debbugs.gnu.org; Sun, 19 Jun 2022 14:28:35 -0400 Original-Received: from forward501p.mail.yandex.net ([77.88.28.111]:51874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2zev-0007y0-Vd for 37473@debbugs.gnu.org; Sun, 19 Jun 2022 14:28:33 -0400 Original-Received: from sas8-6461c81dc980.qloud-c.yandex.net (sas8-6461c81dc980.qloud-c.yandex.net [IPv6:2a02:6b8:c1b:2a09:0:640:6461:c81d]) by forward501p.mail.yandex.net (Yandex) with ESMTP id A96F262126F3; Sun, 19 Jun 2022 21:28:22 +0300 (MSK) Original-Received: from sas2-eda296917d2e.qloud-c.yandex.net (sas2-eda296917d2e.qloud-c.yandex.net [2a02:6b8:c14:251e:0:640:eda2:9691]) by sas8-6461c81dc980.qloud-c.yandex.net (mxback/Yandex) with ESMTP id rp1P6suS1f-SMgal7sl; Sun, 19 Jun 2022 21:28:22 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1655663302; bh=mT4d+fLjLl2QBCBLLUbjfNS+8g5PId8DaIGmnzgsTWA=; h=In-Reply-To:Subject:Cc:Date:References:To:From:Message-ID: Reply-To; b=Ge0JkdSYdtl/uN7EnlBIIkuimcXqN44on36fjETBL0rCIol2Yo2QdZE4tQaa9UvnD nBPqOta2lP5JOqYZzv4E5cV0niql1OPQ/3hLisArqWou+1pIkC2a2A+zYY6+/TuOQ4 Ok4x2UY7OZyCUxEkcBy9s5nr1i9XTnINDO/Lj2xY= Authentication-Results: sas8-6461c81dc980.qloud-c.yandex.net; dkim=pass header.i=@yandex.com Original-Received: by sas2-eda296917d2e.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id dWh7qjI1Hb-SLMGmuTr; Sun, 19 Jun 2022 21:28:21 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T In-Reply-To: <466d6eb8-b02f-9e49-6c79-95c5fa3d7252@orange.fr> (David Ponce's message of "Sun, 19 Jun 2022 18:43:33 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAAEkAAAATAgMAAAChCMjeAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEX/zAABCWP///8I RHjYAAAAAWJLR0QCZgt8ZAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+UFEAk5BvqS634A AAAbSURBVBjTY2BgCA1hYA0FAxDDgQEERsXoIAYA2F9Eb3cpB+AAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjEtMDUtMTZUMTA6NTY6MTcrMDE6MDCh/kkpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA1 LTE2VDA5OjU3OjA2KzAxOjAwTyZ6HwAAAABJRU5ErkJggg== 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:234813 Archived-At: >>>>> David Ponce writes: > Hello, The below related today's commit to xface.c breaks > antialiasing: > From b2d11d69dd49864874f8fe53669b4049e83bfce9 Mon Sep 17 00:00:00 > 2001 From: Po Lu Date: Sun, 19 Jun 2022 > 21:57:11 +0800 Subject: More conservative fix for bug#37473 > * src/xfaces.c (realize_gui_face): Add more conservative fix, > since the last change makes C-x C-+ lead to weight weirdness on my > machine. --- src/xfaces.c | 23 ++++++++++++----------- 1 file > changed, 12 insertions(+), 11 deletions(-) > diff --git a/src/xfaces.c b/src/xfaces.c index 4242205..25b5e4d > 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5909,7 +5909,7 @@ > realize_gui_face (struct face_cache *cache, Lisp_Object > attrs[LFACE_VECTOR_SIZE] #ifdef HAVE_WINDOW_SYSTEM struct face > *default_face; struct frame *f; - Lisp_Object stipple, underline, > overline, strike_through, box; + Lisp_Object stipple, underline, > overline, strike_through, box, temp_spec; > eassert (FRAME_WINDOW_P (cache->f)); > @@ -5953,17 +5953,18 @@ realize_gui_face (struct face_cache > *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] if (! FONT_OBJECT_P > (attrs[LFACE_FONT_INDEX])) { /* We want attrs to allow overriding > most elements in the - spec, but we don't want to start with an > all-nil font, - either, because then we lose attributes like - > antialiasing. This should probably be fixed in a - different way, > see bug#17973 and bug#37473. */ - Lisp_Object spec = > copy_font_spec (attrs[LFACE_FONT_INDEX]); - Ffont_put (spec, > QCfoundry, Qnil); - Ffont_put (spec, QCfamily, Qnil); - Ffont_put > (spec, QCregistry, Qnil); - Ffont_put (spec, QCadstyle, Qnil); + > 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); + + if (FONTP (attrs[LFACE_FONT_INDEX])) + > Ffont_put (temp_spec, QCantialias, + Ffont_get > (attrs[LFACE_FONT_INDEX], + QCantialias)); + > attrs[LFACE_FONT_INDEX] - = font_load_for_lface (f, attrs, spec); > + = font_load_for_lface (f, attrs, temp_spec); } if (FONT_OBJECT_P > (attrs[LFACE_FONT_INDEX])) { -- > cgit v1.1 > The below marked line seems not correct. According to the previous > condition "if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))", it > should always be false, so the antialising attibute is never > preserved: > if (FONTP (attrs[LFACE_FONT_INDEX])) <===================== > Ffont_put (temp_spec, QCantialias, Ffont_get > (attrs[LFACE_FONT_INDEX], QCantialias)); > Thanks, David Ponce Yes, I see exactly the same breakage. I reported this to emacs-dev - wrong site! Best wishes, Colin.