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: Tue, 22 Nov 2022 16:38:58 +0200 Message-ID: <83cz9f12bh.fsf@gnu.org> References: <83cz9j9zyu.fsf@gnu.org> <838rk77yfo.fsf@gnu.org> <834juu9aya.fsf@gnu.org> <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12660"; 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 Tue Nov 22 15:39:13 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 1oxUQa-000345-JM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Nov 2022 15:39:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxUQV-00082h-I0; Tue, 22 Nov 2022 09:39:07 -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 1oxUQQ-00081b-VL for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 09:39:03 -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 1oxUQQ-0001US-NN for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 09:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxUQQ-0002Qw-7p for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 09:39: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: Tue, 22 Nov 2022 14:39:02 +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.16691279359342 (code B ref 59347); Tue, 22 Nov 2022 14:39:02 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 22 Nov 2022 14:38:55 +0000 Original-Received: from localhost ([127.0.0.1]:50310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxUQI-0002Qa-Lo for submit@debbugs.gnu.org; Tue, 22 Nov 2022 09:38:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxUQG-0002QM-1I for 59347@debbugs.gnu.org; Tue, 22 Nov 2022 09:38:53 -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 1oxUQ9-0001T6-SH; Tue, 22 Nov 2022 09:38:45 -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=weUnPCx4iZHPeYRPZDT8j58tX2eeR1xU04Dsb2EU8Jo=; b=nkB0Trk03dah 1eBffh1/iktOyT9zHylvcDCCskwk07Mk+Xa8Jo3/CkkaBDm7zJNjyc8F5fYTk8mFt8zG0p185JGOI TAXT15tf6zp1jnfWix2g6UsIGZ6Qy21dsX0taI/FMm0f1rKmVoshTIOlI6eeSPuuFg92iiIvlVfbz m9sSdB09UMkVOSHtwzaHNs3g1Zl6umf2cvLbELWE5bG0NvAEVjx7nI1s/Oj29VXThPj0cDuHdw4sQ 85tPE74cQoZrOEnsGgXEv9g2XkFduG0CNdpR8vQ+d+HxCfHGYLDfsff1Vqp5KvXKqoaIgKJNQnNcb qiTotAsfywI39ddFHmMPrg==; 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 1oxUQ9-0007jL-An; Tue, 22 Nov 2022 09:38:45 -0500 In-Reply-To: <0d1ea3007f532a493429@heytings.org> (message from Gregory Heytings on Tue, 22 Nov 2022 13:38:19 +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:248643 Archived-At: > Date: Tue, 22 Nov 2022 13:38:19 +0000 > From: Gregory Heytings > cc: Stefan Monnier , 59347@debbugs.gnu.org > > > Whereas with your proposal, it will start from a "clean slate" every > > time and will need to examine many (if not all) of the fonts on the > > system to be sure score-only matches will find the best candidate. > > > > That's not what it does, no. The loop in font_find_for_lface limits the > number of fonts that are considered to some foundry, family, registry and > additional style, and only considers more fonts if no suitable fonts have > been found. But the same considerations apply to weight, slant, and width: shouldn't we prefer an identical value for each one of those, if that is possible? font_score has its own ideas about which one of these 3 is "more equal", AFAICT. And if no suitable candidate is found by making these 3 attributes free, then we are back to the same problem, now with non-numerical attributes. Right? > > Also, font_score only scores the numerical attributes, so how do we > > assess the "score" of matches for :family or :adstyle? > > That's the purpose of the loop at the end of font_find_for_lface. It > starts with a specific spec and gradually makes it less specific if > necessary (that is, if no suitable font has been found with a more > specific spec). So we will be back to the same problem with those.