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: Fri, 31 Dec 2021 19:35:53 -0700 Message-ID: <87sfu8mbcm.fsf@melete.silentflame.com> References: <87zgoi8xve.fsf@melete.silentflame.com> <83r19uim2q.fsf@gnu.org> <871r1uyq1i.fsf@athena.silentflame.com> <8335mahr8f.fsf@gnu.org> <87v8z4mh5g.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17890"; 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) To: Eli Zaretskii , 52888@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 01 03:37: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 1n3UGc-0004RO-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 03:37:11 +0100 Original-Received: from localhost ([::1]:36860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3UGa-0000Yo-63 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Dec 2021 21:37:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3UGU-0000YQ-2W for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 21:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3UGT-0000ot-P6 for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 21:37:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3UGT-00027f-Ni for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 21:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jan 2022 02:37:01 +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.16410045638059 (code B ref 52888); Sat, 01 Jan 2022 02:37:01 +0000 Original-Received: (at 52888) by debbugs.gnu.org; 1 Jan 2022 02:36:03 +0000 Original-Received: from localhost ([127.0.0.1]:57662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3UFX-00025v-0N for submit@debbugs.gnu.org; Fri, 31 Dec 2021 21:36:03 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:39647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3UFV-00025N-6u for 52888@debbugs.gnu.org; Fri, 31 Dec 2021 21:36:01 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5AB653200AF0; Fri, 31 Dec 2021 21:35:55 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 31 Dec 2021 21:35:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=WjOrQ4v39MHV1TJrwG0s0s6bhk urB9A/RTyOBJhsvoE=; b=sL8yj7PvcsfPbjXdq9yzd4dSX/Vo8PgwBtJVPJmO6e nw3eOCpFa3i3NL6fNHAiuKuBo9CB2uNoT3Wzzd2kS86HpmSFPJLYhO05nuO0gSrk QVEdZl3iw5JFaCTgbDIpkChKsNHLdGURQvfDBNX60/kJbYjbrx+RutdajYjWEznU vjROKvKGwcds9dJ4oaDcMvg01iqhRKMjrtJnvSnH5trAfJMjkzi9Z8tLV4cl3toO eZnyVLaT0qwgU0eLD9hkBevmzCkZPeV3FkCNfn3CuXOqTa7OJilERaW1w6xcPeTG uchl1E+eKey399l8DoyiUcF8mj0IDUmeviN0Dgg2kPSg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=WjOrQ4 v39MHV1TJrwG0s0s6bhkurB9A/RTyOBJhsvoE=; b=cuKzH4pSMHJH7sEIUXz8xE 9FdoR6wfyAjD3TI5Ce90xLCErOXkLLax7VcYHSGw2fj/wJk5A/K5PoSLJWpsNwzM IKqsknUTHmGwM01kJbXQNZsgoRu6zRVQgvIy0GU6t7HSJ6h3kFCZO52DyUQhg6Bj HpszcsUur45OCCc8uTcu/0KsbxkFi72NVY7PW3SAWEyB7b53sxAB4aYOnu8hiH8k csJnki2avqokI4Ezn0YkFFI3cg9U/K4NH6p0E7An5R/KS5RifogZCGILkhpKlvIw nvrNPxWivDWMgpKjT+f0GU910AXQ3FtbQeCUxvk48i0brLdCv98Pp7UcfmCZ3yrA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddviedggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhephfeuieelgeefleehgeduhedvgfdtffdujeffffehueffveeg ffeuudehfeeihfeknecuffhomhgrihhnpehtthhfrdhsohenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhi thhtohhnrdhnrghmvg X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 31 Dec 2021 21:35:54 -0500 (EST) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 196D47F83ED; Fri, 31 Dec 2021 19:35:53 -0700 (MST) In-Reply-To: <87v8z4mh5g.fsf@melete.silentflame.com> 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:223491 Archived-At: Hello, On Fri 31 Dec 2021 at 05:30PM -07, Sean Whitton wrote: > The ftcrhb backend returns a FcPattern for each of the weights contained > in Inconsolata-VariableFont_wdth,wght.ttf. So Emacs does not need to > learn anything special about these variable weight files in order to > support them, I think. However, this code in ftfont_pattern_entity can > sometimes set FONT_WEIGHT_INDEX to nil: > > if (FcPatternGetInteger (p, FC_WEIGHT, 0, &numeric) == FcResultMatch) > { > FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX, make_fixnum (numeric)); > } ... or FcPatternGetInteger returns something other than FcResultMatch, which is in fact what is happening. I tried FcPatternGetDouble in an else branch and that fails too, so it seems fontconfig cannot determine a weight for the variant in question. So, perhaps each of the if (FcPatternGetInteger (...)) conditionals that corresponds to one of the FONT_* fields that the font.c functions assume are fixnums should have an else branch to return Qnil? -- Sean Whitton