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: Sat, 01 Jan 2022 15:31:15 -0700 Message-ID: <875yr3ay18.fsf@melete.silentflame.com> References: <87zgoi8xve.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="9459"; mail-complaints-to="usenet@ciao.gmane.io" 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 23:32: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 1n3mv5-0002EW-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 23:32:13 +0100 Original-Received: from localhost ([::1]:36156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3mv3-0003eX-7c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 17:32:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:32974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3muw-0003e9-7w for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 17:32:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3muv-0004mS-U4 for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 17:32:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3muv-0000Wj-NW for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 17:32: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 22:32: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.16410762901961 (code B ref 52888); Sat, 01 Jan 2022 22:32:01 +0000 Original-Received: (at 52888) by debbugs.gnu.org; 1 Jan 2022 22:31:30 +0000 Original-Received: from localhost ([127.0.0.1]:59525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3muP-0000VZ-M2 for submit@debbugs.gnu.org; Sat, 01 Jan 2022 17:31:30 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3muH-0000V6-Tp for 52888@debbugs.gnu.org; Sat, 01 Jan 2022 17:31:28 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C99F65C0100; Sat, 1 Jan 2022 17:31:16 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 01 Jan 2022 17:31:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:date:message-id:mime-version :content-type; s=fm2; bh=3G/HX8kX2qB8Mgf7q2xuuqHn8COLsW64w+x4d0d GAJA=; b=FjsFytv++cTwuZFtDJK55WLBZLuglnXEOBu2G0lyFdsyycMyngZ2Xym Y1A8osWWMSIURlgMW8Z5uMVb7hUxmd8REyaWMWs+1DHsr/iKsU+NvaBI87bhTtlF c/JFk+Zu/38kSPHKPkmhd/rLcbXyKDfhHiEz6JnXKQeriq6ygfkxl6Ts/d9HeMcO ok/ro8iHfXSiY8eMP3lhREQX4JRXCFKatpDagciAMjIIIC8rCyN1Z0ZghgRKU4ru 9srpVj47cKoCaPPvKWmTrE35Cc+4n0O/mMwLQNyoddvhRQxsMw/FWC+ExJt+oEbQ R/fqTOxMKk7ArfmQ+GZwfe9XEKisBIg== 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:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3G/HX8kX2qB8Mgf7q 2xuuqHn8COLsW64w+x4d0dGAJA=; b=Watx8/EurDVmwlnf8iG5h/1nFNPh07C7/ MzWok3jJkmI/xw3Vewg7rAXobqtlJnQBX0MalotRgJmuzm4pF0arBTzN7b1z4NOE qEdU+x6hZKxjHR8hMDUJ+tOrmxKeDVvdebsWQyOldqrGTnwHoTgyJlVSj6irXQex hq7N6LxW2FhH7m995SBkYClktCKiWf0W/8R5RGM2L8rnExe5H596hgemRIEfeii8 kRdWZkd4jyhE6baeVAGP3GGx3fVERbDBzZfBW1MD9Alo0IfDjj1gsWOVDOY5lRrb WbpKl1X/V9qyLtv5Kc33MFC0Gn9sld84fWckDOl1ZU7V5rijmmxNw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddvjedgudeivdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujgffkfggtgesthdttddttddttdenucfhrhhomhepufgvrghnucgh hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpefhgeelleelfffgleelueejleevfedtjeelffetudetvdejgedu hfffgfegffegueenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhp fihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 1 Jan 2022 17:31:16 -0500 (EST) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id B54FB7F8301; Sat, 1 Jan 2022 15:31:15 -0700 (MST) In-Reply-To: <83sfu8exkp.fsf@gnu.org> X-TUID: kz7D24EaBi6a 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:223525 Archived-At: Hello, On Sat 01 Jan 2022 at 09:15am +02, Eli Zaretskii wrote: >> From: Sean Whitton >> Date: Fri, 31 Dec 2021 19:35:53 -0700 >> >> > 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? > > Maybe. > > However, the question that I think we should ask ourselves at this > point is whether there's a reasonable way to process these fonts into > a font spec that Emacs expects. So if FcPatternGetInteger and > FcPatternGetDouble don't do the job, perhaps there's another > fontconfig function that does, or maybe these fonts need to be > processed in some slightly different ways (like in a loop, for > example) to produce the weight matches from them? Can you perhaps ask > the developers of this font to help? Or maybe we could ask on the > fontconfig forum? I've filed a bug[1] and posted to the fontconfig mailing list. To be clear, we are generating valid font specs for a number of weights available in this multi-weight .ttf. It's just that some of the variants that are in there do not seem to have a valid weight, or something like that. So if we give up on those variants, we wouldn't be giving up on the whole .ttf, so it's not a complete loss. [1] https://github.com/googlefonts/Inconsolata/issues/69 -- Sean Whitton