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: Thu, 17 Oct 2024 09:21:08 +0300 [thread overview]
Message-ID: <86bjzjp7vv.fsf@gnu.org> (raw)
In-Reply-To: <0d2238ff-5cf9-4ba7-97ab-11b76892198d@imayhem.com> (message from Cecilio Pardo on Wed, 16 Oct 2024 23:35:34 +0200)
> Date: Wed, 16 Oct 2024 23:35:34 +0200
> Cc: 73730@debbugs.gnu.org
> From: Cecilio Pardo <cpardo@imayhem.com>
>
> 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?
> 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.
> - 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.
> >> + glyph_run.bidiLevel = 0;
> > ^^^^^^^^^^^^^
> > Is this because otherwise DirectWrite will possibly reorder the
> > glyphs or something? Did you test this with R2L text, e.g. by
> > displaying TUTORIAL.he? I did try, and it looks OK, but are there any
> > color fonts that cover the Hebrew block, so I could be sure everything
> > works in that case?
> >
> > More generally, what color fonts can be used with this build on
> > Windows for characters other than Emoji, in addition to Segoe UI
> > Emoji?
>
>
> The documentation describes this field as the "implicit resolved level
> of the glyph run". Odd levels indicate RTL, and the function asks for
> the right side position as origin, so I think they would be reordered.
>
> As there is no reference to bidi in w32font.c, I assumed glyphs reach
> this layer prepared to be rendered ltr.
Yes, that's true.
> I think the only color font that Windows has is the emoji one. I'll try
> to find some other to test this.
Thanks.
> >> +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.
next prev parent reply other threads:[~2024-10-17 6:21 UTC|newest]
Thread overview: 15+ 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 [this message]
2024-10-17 10:38 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bjzjp7vv.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).