From: Eli Zaretskii <eliz@gnu.org>
To: Cecilio Pardo <cpardo@imayhem.com>
Cc: 73730@debbugs.gnu.org, kbrown@cornell.edu
Subject: bug#73730: 31.0.50; Support for color fonts on MS-Windows
Date: Sun, 20 Oct 2024 16:55:44 +0300 [thread overview]
Message-ID: <86o73ej2u7.fsf@gnu.org> (raw)
In-Reply-To: <80dc50bd-b2d4-4d21-ad38-322412588b3b@imayhem.com> (message from Cecilio Pardo on Sun, 20 Oct 2024 15:35:10 +0200)
> Date: Sun, 20 Oct 2024 15:35:10 +0200
> From: Cecilio Pardo <cpardo@imayhem.com>
> Cc: 73730@debbugs.gnu.org, kbrown@cornell.edu
>
>
> On 17/10/2024 12:38, Cecilio Pardo 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.
> >
>
> The error is caused indeed by fonts with size == 0.
>
> - w32-find-non-USB-fonts calls open-font with size == nil.
> - open-font gets the size from font-entity, that is also empty.
> - It ends up calling CreateFontIndirect with a LOGFONT
> with lfHeight == 0
> - Then, w32-find-non-USB-fonts calls font-get-glyphs, which call
> text_extents.
> - text_extents on DirectWrite fails with a font of size 0, but
> w32font_text_extents does return values that are not 0.
>
> If the case of size <= 0, we are now falling back to
> w32font_text_extents.
>
> Also, in the case of failures to get text size, draw, or encode char,
> now we will disable directwrite for the particular font.
>
> I'll send a patch as soon as I can.
Great, thanks.
next prev parent reply other threads:[~2024-10-20 13:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 11:16 bug#73730: 31.0.50; Support for color fonts on MS-Windows Cecilio Pardo
2024-10-10 13:08 ` Eli Zaretskii
2024-10-10 15:14 ` Cecilio Pardo
2024-10-10 16:33 ` Eli Zaretskii
2024-10-10 16:46 ` Cecilio Pardo
2024-10-15 22:18 ` Cecilio Pardo
2024-10-16 11:01 ` Eli Zaretskii
2024-10-16 11:32 ` Eli Zaretskii
2024-10-16 21:35 ` Cecilio Pardo
2024-10-17 6:21 ` Eli Zaretskii
2024-10-17 10:38 ` Cecilio Pardo
2024-10-20 13:35 ` Cecilio Pardo
2024-10-20 13:55 ` Eli Zaretskii [this message]
2024-10-22 22:14 ` Cecilio Pardo
2024-10-23 10:03 ` Eli Zaretskii
2024-10-23 14:17 ` Cecilio Pardo
2024-10-23 17:53 ` Eli Zaretskii
2024-10-24 20:19 ` Cecilio Pardo
2024-10-25 7:26 ` Eli Zaretskii
2024-10-25 10:17 ` Cecilio Pardo
2024-10-25 12:00 ` Eli Zaretskii
2024-10-26 20:13 ` Cecilio Pardo
2024-10-27 6:36 ` Eli Zaretskii
2024-10-27 13:32 ` Eli Zaretskii
2024-10-27 13:41 ` Cecilio Pardo
2024-10-27 15:44 ` Cecilio Pardo
2024-10-27 16:54 ` Eli Zaretskii
2024-10-27 17:50 ` Cecilio Pardo
2024-10-27 19:15 ` Eli Zaretskii
2024-10-29 8:57 ` Cecilio Pardo
2024-10-25 11:51 ` Eli Zaretskii
2024-10-25 13:43 ` Cecilio Pardo
2024-10-20 16:17 ` Eli Zaretskii
2024-10-20 18:20 ` Cecilio Pardo
2024-10-20 18:33 ` Eli Zaretskii
2024-10-20 18:37 ` Cecilio Pardo
2024-10-10 21:50 ` Cecilio Pardo
2024-10-11 3:36 ` Eli Zaretskii
2024-10-11 6:28 ` Eli Zaretskii
2024-10-11 7:19 ` Cecilio Pardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86o73ej2u7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73730@debbugs.gnu.org \
--cc=cpardo@imayhem.com \
--cc=kbrown@cornell.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.