GNU bug report logs - #73730
31.0.50; Support for color fonts on MS-Windows

Previous Next

Package: emacs;

Reported by: Cecilio Pardo <cpardo <at> imayhem.com>

Date: Thu, 10 Oct 2024 11:17:01 UTC

Severity: wishlist

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 73730 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73730 <at> debbugs.gnu.org
Subject: Re: bug#73730: 31.0.50; Support for color fonts on MS-Windows
Date: Wed, 16 Oct 2024 00:18:20 +0200
[Message part 1 (text/plain, inline)]
The attached patch works without a new font driver.

This requires the harfbuzz font backend to be available.

It works by modifying the harfbuzz backend to use DirectWrite at
some points, if it is available:

- When encoding characters: w32hb_encode_char
- When measuring text: w32font_text_extents
- When drawing text: w32font_draw

DirectWrite is setup by calling w32_initialize_direct_write.  From
that point, the function w32_use_direct_write will return true if
DirectWrite is to be used.

The lisp variable w32-inhibit-direct-write can switches it on and off.

It builds with Mingw64 and Mingw. As mingw doesn't have the DirectWrite 
includes, I had to declare a lot of things at the start of the file. 
This line marks the end of that:

/* End of dwrite_3.h definitions.  */

I have tested this only on Windows 11.
[0001-Implement-drawing-text-with-DirectWrite-on-MS-Window.patch (text/plain, attachment)]

This bug report was last modified 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.