From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#59347: 29.0.50; `:family` face setting ignored Date: Sun, 20 Nov 2022 17:43:23 +0000 Message-ID: <7cc9e03786c281cffdd4@heytings.org> References: <83bkp4bfqf.fsf@gnu.org> <83wn7s9txp.fsf@gnu.org> <83pmdk9pat.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21604"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 59347@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 20 18:44:33 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 1owoMq-0005Rq-Tf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 18:44:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owoMO-0007SB-CF; Sun, 20 Nov 2022 12:44: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 1owoMM-0007Ry-NG for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 12:44: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 1owoMM-000305-4m for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 12:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owoML-00030t-S7 for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 12:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Nov 2022 17:44: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.166896620711531 (code B ref 59347); Sun, 20 Nov 2022 17:44:01 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 20 Nov 2022 17:43:27 +0000 Original-Received: from localhost ([127.0.0.1]:44498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owoLm-0002zu-QL for submit@debbugs.gnu.org; Sun, 20 Nov 2022 12:43:27 -0500 Original-Received: from heytings.org ([95.142.160.155]:51688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owoLl-0002zl-0n for 59347@debbugs.gnu.org; Sun, 20 Nov 2022 12:43:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1668966204; bh=744YgYffAQaoeCZqCCkV9YEZ6tOQ+DFQcOGzl8Hhz+I=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Rnz+d6egmH+DHxgV32vtnT9vBF0Ke7IUURboCcA5JsXfSsAmhk0rVkt0X9p6f4j/w LLRj23JESgEaXn9rTLRrwKmEeD/knMtj5w3RcAfZugTv1Yzz+sR5acfUhv/BHLVIZ+ gRbxFcesYCfYCUhg1GnUwejTcej0Al9RBabXs/8nFhx3H8z7gLhCzl5v5Mh77mKjGK IzxTiUltd9XU1MH772qVXhZAK1PELB4Nc7jVULys7uS8c4rp5Amy+m0SjWvLtPIDkR yYEYR069gjNQyjcW0JkllIgxDSCqUumaBttu60gB4hv7zkeRZ6leOtcpDQPv+Ul2a9 GBz82jc5ANg9Q== In-Reply-To: <83zgcl4jra.fsf@gnu.org> 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:248443 Archived-At: >> -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 >> >> in which you see the 'medium' height. > > You mean weight, not height, right? > Yes, sorry for the typo. > > Does this font have a 'regular' weight? If it does, why didn't Emacs > choose the 'regular' variant? > Because the spec specified that it should find a medium variant. So regular variants are rejected (because of 65fd3ca84f). > > In any case, I don't understand how asking for a specific foundry can > work around the problem with weight. If you do understand that, please > tell the details. > I'd have to investigate this, is it really worth the effort given that a proper fix has already been found? >>> If we don't make font_score consistent with the change you made, we >>> will have other weird problems. Maybe not in this particular case >>> (although I'm not sure even in this), but in others. >> >> Thanks, I think I see what you mean now. I overlooked the fact that >> font_select_entity is called with attrs and not with work, so indeed >> font_score called in font_sort_entities might reject (?) a legitimate >> font. Is that what you mean? > > Yes. We need to make sure the scoring will not now sometimes prefer the > medium weight where the regular weight exists and is a better match. > Not only should it not reject a legitimate font, but also not prefer > another font due to this change. IOW, the change should ideally only > affect the cases where the 'medium' weight doesn't exist, and we > therefore prefer to use 'regular' rather than reject the family. > I don't think the case you have in mind could happen in the scenario of this bug or bug#57555 (if a regular weight exists and is a better match the loop in font_find_for_lface will exit with that better match), but indeed with some other call sequence this could perhaps happen. I'll see what I can do.