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.devel Subject: Re: display-supports-face-attributes-p question Date: Sun, 29 Aug 2021 15:05:37 +0300 Message-ID: <83pmtwlalq.fsf@gnu.org> References: <87lf4kzkf7.fsf.ref@yahoo.com> <87lf4kzkf7.fsf@yahoo.com> <83v93oldoz.fsf@gnu.org> <87bl5gze9n.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27446"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 29 14:07:05 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mKJaa-0006yR-Vy for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Aug 2021 14:07:04 +0200 Original-Received: from localhost ([::1]:47788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKJaY-00034y-Mw for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Aug 2021 08:07:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKJZP-0002Cp-5T for emacs-devel@gnu.org; Sun, 29 Aug 2021 08:05:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35846) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKJZO-0007BB-Uc; Sun, 29 Aug 2021 08:05:50 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3873 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 1mKJZO-0000T9-Hz; Sun, 29 Aug 2021 08:05:50 -0400 In-Reply-To: <87bl5gze9n.fsf@yahoo.com> (message from Po Lu on Sun, 29 Aug 2021 19:22:44 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:273404 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sun, 29 Aug 2021 19:22:44 +0800 > > It appears that gui_face_attributes_p can't find properties differing > between the :slant italic font and the default font; the EQ comparison > at xfaces.c:5163 always evaluates to true. What confuses me is how this > is possible, as, if I understand correctly, (struct font *)->props > should be populated by `make_font_object' from the contents of the > entity, and if the font driver finds a font with :slant italic, the > entity should also have it's slant set to italic. When the call to lookup_face in gui_supports_face_attributes_p gets into realize_gui_face, please show the results of (gdb) pp attrs[LFACE_FONT_INDEX] before and after the call to font_load_for_lface in this snippet: if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) attrs[LFACE_FONT_INDEX] = font_load_for_lface (f, attrs, Ffont_spec (0, NULL));