From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.bugs Subject: bug#73730: 31.0.50; Support for color fonts on MS-Windows Date: Thu, 17 Oct 2024 12:38:31 +0200 Message-ID: References: <36a6b4d5-c719-44d6-957d-bcd7db5a854b@imayhem.com> <86o73s14x5.fsf@gnu.org> <0a0c622c-5b69-4f30-94b1-67a238e124b4@imayhem.com> <861q0gqpkf.fsf@gnu.org> <0d2238ff-5cf9-4ba7-97ab-11b76892198d@imayhem.com> <86bjzjp7vv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35103"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 73730@debbugs.gnu.org, kbrown@cornell.edu To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 17 12:40:01 2024 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 1t1NvF-0008wt-3A for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Oct 2024 12:40:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1Nv2-0007za-EQ; Thu, 17 Oct 2024 06:39:48 -0400 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 1t1Nuz-0007zL-QJ for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 06:39:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1Nuv-0007J1-Sz for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 06:39:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=Zsf4V9Om4qxbjqQL+xkRBEwIgvS6MDPSLI2eErn+E40=; b=Mnpb2vkI4L/SdL6H+2az0wlyfC8GQIvEuPFN4LBTjSOgbxt7hEf/OrIc0Xv1SpeWqfkvO/kW80Qqc6mu01ZMkRgdZy+2VM7cZ0Qk6lbpSHO/8FcIGs1efhv3NJXR8GpcOKKS7F3NV4gEM4T48k3MuZiQp+OOmzyjUJoEqnfDedoWOArCg6b0BXL4zt0XknpTmnHNWRMJoZdUtpyJt7zO3kLjErBo6NLCseOr1LcVawrW4OSsJYY37fq438UXgxc4NxMXLqKV57LkaAyPv22VpfQDXkTXrt4Wou1fh78NR1qogPrziMCHloIMBeHWmcER29JlyG+x4uN8mDStOGyqXQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1NvG-0000Hs-Bf for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 06:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Cecilio Pardo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Oct 2024 10:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73730 X-GNU-PR-Package: emacs Original-Received: via spool by 73730-submit@debbugs.gnu.org id=B73730.17291615431009 (code B ref 73730); Thu, 17 Oct 2024 10:40:02 +0000 Original-Received: (at 73730) by debbugs.gnu.org; 17 Oct 2024 10:39:03 +0000 Original-Received: from localhost ([127.0.0.1]:33513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1NuI-0000GD-OR for submit@debbugs.gnu.org; Thu, 17 Oct 2024 06:39:02 -0400 Original-Received: from mail.imayhem.com ([82.223.54.191]:46397 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1NuH-0000FY-8y for 73730@debbugs.gnu.org; Thu, 17 Oct 2024 06:39:01 -0400 Original-Received: from [10.0.12.77] (66.red-2-136-43.staticip.rima-tde.net [2.136.43.66]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id 4BD5D80119; Thu, 17 Oct 2024 10:38:32 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 2.136.43.66) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[10.0.12.77] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: <86bjzjp7vv.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293717 Archived-At: On 17/10/2024 8:21, Eli Zaretskii wrote: >> Still not done with this, but I am sending a new patch to fix the bug >> with w32-find-non-USB-fonts. It calls text_extents with a font of size >> 0. Checking for that seems to solve the problem. > > Is that really TRT? What does it mean font_size = 0 in this case? No, I was wrong, sorry. DirectDwrite is failing to create a font from certain GDI fonts. I need to then fall back to w32font. I'm on it. >> BTW, why does that variable show as undocumented with >> describe-variables? What am I doing wrong? > > You used DEFVAR_BOOL inside a function. It should be on the top level > (look at other places where we define such variables), then > make-docfile will collect its definition and it will be written to > etc/DOC. Thanks. >> - Instead of aborting on failure, just disable DirectWrite and let emacs >> continue. This will take some work. > > Instead of disabling DirectWrite, it might be better to fall back on > previous code -- that way, the glyphs will be shown, but without > colors. The trick is to detect this early enough, because some fonts > AFAIR cannot be displayed using non-dwrite code. Ok. >>>> +void *w32_font_get_dwrite_cache (struct font *font, float *font_size); >>>> +void w32_font_set_dwrite_cache (struct font *font, void *cache, float font_size); >>> >>> Why aren't these functions defined in w32dwrite.c? >> >> They need to know about the uniscribe_font struct, which is defined there. > > If that's the only reason, we could perhaps move the definition of > uniscribe_font struct to w32font.h. Will do that.