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#59347: 29.0.50; `:family` face setting ignored Date: Thu, 08 Dec 2022 16:16:25 +0200 Message-ID: <83cz8u2d6u.fsf@gnu.org> References: <7cc9e03786024fc72f3b@heytings.org> <83a64l65ai.fsf@gnu.org> <7cc9e0378678a092e6ee@heytings.org> <835yf962q4.fsf@gnu.org> <7cc9e03786754c9e0aaf@heytings.org> <83zgcl4jra.fsf@gnu.org> <7cc9e03786c281cffdd4@heytings.org> <83tu2t4ie9.fsf@gnu.org> <7cc9e03786e324ff82ef@heytings.org> <83bkp04gjl.fsf@gnu.org> <83leo42vm9.fsf@gnu.org> <0d1ea3007fd94b7ae0b1@heytings.org> <83r0xv1649.fsf@gnu.org> <0d1ea3007f532a493429@heytings.org> <83cz9f12bh.fsf@gnu.org> <835yewleyn.fsf@gnu.org> <83tu2b9rlx.fsf@gnu.org> <83k0347gtu.fsf@gnu.org> <83v8mm2ug7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29793"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 59347@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 15:17:16 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 1p3Hi7-0007X3-Bd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 15:17:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Hhw-0002GH-MO; Thu, 08 Dec 2022 09:17: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 1p3Hhu-0002Fi-NJ for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 09:17: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 1p3Hhu-0003QA-EL for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 09:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3Hht-0003TE-RH for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 09:17:01 -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, 08 Dec 2022 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59347 X-GNU-PR-Package: emacs Original-Received: via spool by 59347-submit@debbugs.gnu.org id=B59347.167050900413325 (code B ref 59347); Thu, 08 Dec 2022 14:17:01 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 8 Dec 2022 14:16:44 +0000 Original-Received: from localhost ([127.0.0.1]:57049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Hhb-0003Sr-UN for submit@debbugs.gnu.org; Thu, 08 Dec 2022 09:16:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Hha-0003Sk-9J for 59347@debbugs.gnu.org; Thu, 08 Dec 2022 09:16:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3HhU-0001w9-31; Thu, 08 Dec 2022 09:16:36 -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=KeBLjrsMwoUeUe4g61uCvmgm48JGhZPkHFdyuJsWBhw=; b=JMOi0G2Ws3KN mSQ7+dtmjbyO2izaMaFGG09Dqpa5d+OZ4rHOhJwYouK2rgmhtoeEqb45rf4kI0Jbwn5ySjeRH0O46 4PIZKUqBJT+oWI/31adRkXueoW8b7yjAtS54hxJuVxofYJYvTtpN4GQ4JTZQRWt+oBxGJygHr9myt cBZGYoqTEfvDXvvhrlTZJDPaRpHeQyDP8jtNHMAevtKq5t9NA8aF2P6FuNDRfGR+7kVbXrPYuBpiD w3HaSXJv47X/z10hvyD3NVwVTY36Sxc0Ji/BaTI+Db+kJKR7Un5hVF8gACZuLoRd7elv1BntrLC70 oNUHVQMqIVczhQJYZhmMpw==; Original-Received: from [87.69.77.57] (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 1p3HhT-0004vy-Hd; Thu, 08 Dec 2022 09:16:35 -0500 In-Reply-To: (message from Gregory Heytings on Thu, 08 Dec 2022 12:53:15 +0000) 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:250290 Archived-At: > Date: Thu, 08 Dec 2022 12:53:15 +0000 > From: Gregory Heytings > cc: monnier@iro.umontreal.ca, 59347@debbugs.gnu.org > > > The order on which we agreed is only about the numerical attributes: > > width, height, weight, and slant. I'm asking about the other > > attributes, and about their importance relative to the numerical ones. > > You seem to say that this order is self-evident, and I'm questioning > > that. > > Okay, now I see what you mean. It is not self-evident indeed, it is the > intended behavior that is visible (or at least that I see) in the existing > code Well, you just explained in so many words why some of the existing code is wrong in your opinion, so arguments based on the existing code are not very convincing... > and it seems to me that it is the most natural behavior, because > changing the font itself, e.g. from DejaVu to Courier, has more effect / > creates more visual diversity than only changing the > width/height/weight/slant attributes, and in graphical user interfaces > more uniformity is better than more diversity. You again seem to implicitly assume that the presence of the family attribute means the caller must have that family or something close to it. But that needs not be the case, and OTOH the presence of some other attribute, like weight, might by the same logic mean that the caller must have that weight no matter the family. > emacs -Q -fn 'Sans Serif-12:slant=oblique:width=condensed' > > works as expected and behaves like Emacs 28: the font for the default face > is a condensed and oblique variable-pitch sans serif font. And the size is indeed 12? > Okay, so here is an updated patch. To make it easier to investigate bugs > in this area, I think it makes sense to control each field separately, and > also to allow unsetting other attributes, which is what the new variable > does. This is fine with me, although I tend to think that unsetting all the attributes is too much. > + DEFVAR_INT ("realize-gui-face-ignored-spec-attributes", > + realize_gui_face_ignored_spec_attributes, > + doc: /* Ignored font-spec attributes in realize_gui_face. > + > +The value is an integer number and represents a bit mask. > +The attribute corresponding to each bit that is set is cleared in > +realize_gui_face. The bits are: 1 = :foundry, 2 = :family, > +3 = :adstyle, 4 = :registry, 5 = :weight, 6 = :slant, 7 = :width, > +8 = :size, 9 = :dpi, 10 = :spacing, 11 = :avgwidth, 12 = extra > +attributes (:name, :script, :lang and :otf). > + > +There is no reason to change that value except for debugging purposes. */); I suggest to describe the default value in the doc string, since gleaning that from a (decimal) value displayed by Emacs by default is not that easy. Maybe also add a sentence which explains why that is the default. Thanks.