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: Sun, 20 Nov 2022 16:59:01 +0200 Message-ID: <83a64l65ai.fsf@gnu.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="632"; 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 Sun Nov 20 16:00:25 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 1owlo1-000AVE-KI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 16:00:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owlnf-0000NY-Rk; Sun, 20 Nov 2022 10:00:03 -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 1owlne-0000NA-GV for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 10:00: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 1owlne-0000kv-5J for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 10:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owlnd-0007DI-Ud for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 10:00: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: Sun, 20 Nov 2022 15:00: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.166895636027653 (code B ref 59347); Sun, 20 Nov 2022 15:00:01 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 20 Nov 2022 14:59:20 +0000 Original-Received: from localhost ([127.0.0.1]:44312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owlmx-0007Bx-UI for submit@debbugs.gnu.org; Sun, 20 Nov 2022 09:59:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owlmu-0007Bi-I2 for 59347@debbugs.gnu.org; Sun, 20 Nov 2022 09:59:19 -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 1owlmo-0000fl-Ht; Sun, 20 Nov 2022 09:59:10 -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=ifft2y+a2yyaT5c9JMCmMibjjJxLwe/dxN4OeZQDEPk=; b=EU3QrQAbDCy5 0lOD+hhcFxGTOVkQKtMTYk0mvBNVCEZVLUJ+8qxmJNkC/U5+OEqp9fw5nLL5p0bnYqLKCCVI4RaYb la19ps2Qf+hc4QmBi3SpB3GIoDeyfN5d8+/OzGgSlxHQHewL66todgHj55fMtPaIhdmjK4/eB39td BOfKCA54i9/QzsFBVKUd/j1gBax9fyRT/mQXELYf/PhnzMMhYQXlwfxCOuwpJ9cNxKn2iSqjRIm4U P2cp7pw/fvCFZZeiJTOQwTFBGrpLpJnaE+3gGqw0BB08LlkHPgvbxfpKRhrWGdW+sNbvY/LbJnRtv S0CR1W75DeRenYQMCHB0yw==; 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 1owlmX-0006Yj-1M; Sun, 20 Nov 2022 09:59:08 -0500 In-Reply-To: <7cc9e03786024fc72f3b@heytings.org> (message from Gregory Heytings on Sun, 20 Nov 2022 13:57:48 +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:248428 Archived-At: > Date: Sun, 20 Nov 2022 13:57:48 +0000 > From: Gregory Heytings > cc: Eli Zaretskii , 59347@debbugs.gnu.org > > Stefan, could you please try the attached patch and see if it fixes your > problem? (It does here, with your recipe.) > > Eli, could you please review that patch? I'd prefer to delay the discussion of this until after Stefan has time to see why DejaVu Sans is rejected in his cases and describe his findings. If you already did that, please describe your findings. AFAIU, Stefan discovered that the problematic attribute was foundry, and your patch does nothing about foundry. It sounds like your patch is for another problem altogether. A quick comment wrt the patch itself: > + /* If weight is "medium" in SPEC, also try "normal". Fonts with an > + explicit "medium" weight are much less common than fonts with an > + explicit "normal" weight, and for a long time "medium" and > + "normal" (a.k.a. "regular" a.k.a. "book") were synonymous in > + Emacs. See e.g. bug#59347 and bug#57555. */ > + weight[0] = AREF (spec, FONT_WEIGHT_INDEX); > + if (EQ (weight[0], Qmedium)) > + weight[1] = Qnormal, weight[2] = zero_vector; > + else > + weight[1] = zero_vector; This is not enough, IMO: you need to make sure the scoring of candidates is still correct. For example, if the weights of two candidates differ (normal vs medium), but sizes are the same or close, how will that compare with candidates whose weights are identical, but sizes differ? IOW, we need to reconsider how font_score scores the candidates. Thanks.