From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#52888: 29.0.50; font_{delete_unmatched,score} do not handle nil FONT_WEIGHT_INDEX Date: Thu, 30 Dec 2021 10:13:13 -0700 Message-ID: <871r1uyq1i.fsf@athena.silentflame.com> References: <87zgoi8xve.fsf@melete.silentflame.com> <83r19uim2q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15125"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 52888@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 30 18:14:14 2021 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 1n2z0H-0003mF-Dj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Dec 2021 18:14:14 +0100 Original-Received: from localhost ([::1]:42696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2z0F-0002Jd-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Dec 2021 12:14:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2z06-0002GT-W4 for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 12:14:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2z06-0005JG-ME for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 12:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2z06-00014m-E7 for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 12:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Dec 2021 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52888 X-GNU-PR-Package: emacs Original-Received: via spool by 52888-submit@debbugs.gnu.org id=B52888.16408844024045 (code B ref 52888); Thu, 30 Dec 2021 17:14:02 +0000 Original-Received: (at 52888) by debbugs.gnu.org; 30 Dec 2021 17:13:22 +0000 Original-Received: from localhost ([127.0.0.1]:54326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2yzS-00013B-HT for submit@debbugs.gnu.org; Thu, 30 Dec 2021 12:13:22 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2yzQ-00012s-Qu for 52888@debbugs.gnu.org; Thu, 30 Dec 2021 12:13:21 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BB6B35C00BE; Thu, 30 Dec 2021 12:13:14 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 30 Dec 2021 12:13:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=hVwBXR/fOrdT8MnDW+0gb8hE7x qT+BG5XPtvb68B4ko=; b=nf3va1XZ9rmQ4NU58gXmP4OnXpqkUSIR9tgj3b1/Ro OQeNk8LjL1UZgzbPlwhiBRQDtwoyS7/N4xhI35QdwISk1SQEyrCB8Yr+S15jWsb1 303l6+GiO4Fr2yA8cyPExL2TDc4yBw5k+bmrXgNLLwMPnsGjKSzExuj+hS9Lx5Zt +lGyQVdBsIKTB/rPCpcLGpGgaE8o8EayayAZFU9dDOXod6nbPYvh3Q9NXh6uF4p+ su8zJe9PfVBruo9EFhoksqkeYigvtEfwGBQjlifDUwBjKgsKU1e63byRgTMGjPw7 L/24gr0dTMVfMhfiXql4aSwOdLh0UuPDgnny3Q4rQjJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hVwBXR /fOrdT8MnDW+0gb8hE7xqT+BG5XPtvb68B4ko=; b=V5HEXlOyXx69LJJh75YPX1 R1DwJb8tKnAoZIVRX46t0hZGwR076+tNGs/2cQlaQtMZ9Lb0JnekfOb7TBHGn+wF bgay6IaxlYlbydc536Yl0oRJOej5Ed2/ZrDg/eIwAFiJ1IcqkrAj82sSVbGkRR0G d3brjgFZRBmrK5XN0OcMuKiYHWH6ODjO19YFhlB/oetwuOYrSZkeUX0r7DklK29w lIy8SlAXyfJDYVJErKfNPCP6AYqlB63fb4hMCadEeM60e1Gj/pTnYeRxF/JpezQz DuN3zjtlWldYZJ9Y1ytWmDRCFioKOU6muAEroD7PHgXD7DePUzbQk0d4oVQbiN3A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddvfedgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepleeggefgvdeijedvhfdugfegtefgkeekueeileejjeehudeg geefteeghfeuffeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Dec 2021 12:13:14 -0500 (EST) Original-Received: by athena.silentflame.com (Postfix, from userid 1000) id 1FC661B64D4; Thu, 30 Dec 2021 17:13:13 +0000 (UTC) In-Reply-To: <83r19uim2q.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" Xref: news.gmane.io gmane.emacs.bugs:223433 Archived-At: Hello, On Thu 30 Dec 2021 at 09:33am +02, Eli Zaretskii wrote: > Is the patch supposed to allow Emacs to handle these fonts, or is it > just the protection against assertion violations? The latter -- the code implicitly assumes that the weight will always be a fixnum, but that is not so. I want to fix that implicit assumption. > If the latter, isn't it better to teach the font driver to handle > these fonts correctly? > > AFAIU, your patch basically will cause Emacs to reject such fonts and > not use them, which is tantamount to telling users to configure Emacs > to ignore them via, say, face-ignored-fonts. Is that right, or am I > missing something? I don't think it is equivalent to face-ignored-fonts. The weight field in the entity vector is examined only when the weight field in the font spec is non-nil. So my code does not categorically reject these fonts: it rejects them only when the user requested a specific weight, AFAICT. I don't know enough about these variable weight TTFs to judge whether it is worth anyone's time adding better support for them in Emacs. In the case of Inconsolata-VariableFont_wdth,wght.ttf, the font authors provide separate .ttf files for each weight too, so there doesn't seem to be an expectation that applications know how to read the combined file. Thanks for looking! -- Sean Whitton