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 17:54:27 +0200 Message-ID: <835yf962q4.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> <83a64l65ai.fsf@gnu.org> <7cc9e0378678a092e6ee@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21852"; 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:55:14 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 1owmf2-0005U0-Rc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 16:55:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owmev-0000YI-Ai; Sun, 20 Nov 2022 10:55:05 -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 1owmes-0000Y6-H2 for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 10:55: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 1owmes-0003tS-3H for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 10:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owmer-00008v-OO for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 10:55: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:55: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.1668959670507 (code B ref 59347); Sun, 20 Nov 2022 15:55:01 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 20 Nov 2022 15:54:30 +0000 Original-Received: from localhost ([127.0.0.1]:44354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owmeL-000087-Mo for submit@debbugs.gnu.org; Sun, 20 Nov 2022 10:54:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owmeH-00007q-BE for 59347@debbugs.gnu.org; Sun, 20 Nov 2022 10:54:27 -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 1owmeB-0003qG-9X; Sun, 20 Nov 2022 10:54:19 -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=qwjqmHTK3IVGrlfvJbURfGlkFdZPNSXVqSd5tEFw23Q=; b=MVdb3jDSVHPX KQSJcF6mkrKMqH8u36NXRCJexAChW+UN49E1973LdWXNIN+NgubqeEx0b3RSZ1nbRPESo5+rORAMz CqXoEC0n/zSDtYOH/iVHsjg7Zjp6v8de9UVGdgvUQAnA6PJ//W1gp1TPlbUTynOGcr601fkgCdIxa wWy7GfYOxAywOtK/FMjLAarX2Q4SExQejJcxwJe67MeKt0/OkQijTmmzTA1XWlKXFpYbRhFW7wmjN J536l4jiemVbeDhdb2O164SpCQTZGEygMZstR91c19MP/Yzh0493ZZ13rscq3Zt6m+mKwtRaQz3Wn Eoh/UVp0WOIBPLLs72ZDuQ==; 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 1owmeA-00017N-N5; Sun, 20 Nov 2022 10:54:19 -0500 In-Reply-To: <7cc9e0378678a092e6ee@heytings.org> (message from Gregory Heytings on Sun, 20 Nov 2022 15:35:06 +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:248432 Archived-At: > Date: Sun, 20 Nov 2022 15:35:06 +0000 > From: Gregory Heytings > cc: monnier@iro.umontreal.ca, 59347@debbugs.gnu.org > > > 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. > > It's described in the commit message. DejaVu Sans is rejected because the > font of the default face has a 'medium' weight, and DejaVu Sans (like many > other fonts) does not explicitly support that weight. Stefan said that he tried to change the weight, but that had no effect on the problem. So maybe what you see on your system is a different issue. > > AFAIU, Stefan discovered that the problematic attribute was foundry, and > > and your patch does nothing about foundry. > > I don't know how he reached that conclusion, but it's most likely not the > cause of the problem. He described how he reached that conclusion in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59347#65 > > 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. > > > > I don't understand your question. The patch essentially adds an inner > loop in the loop of fond_find_for_lface, to make sure that when weight == > medium, we call font_list_entities two times, first with > > (family, foundry, registry, adstyle, weight == medium) > > and then (if the previous call did not succeed to find a matching font, > IOW, if it did not return nil) with > > (family, foundry, registry, adstyle, weight == normal) > > There is no scoring involved at that point, AFAIU. 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.