bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67794: 30.0.50; mouse-face is not respected on SVG images


From: Eli Zaretskii
Subject: bug#67794: 30.0.50; mouse-face is not respected on SVG images
Date: Wed, 13 Dec 2023 18:23:27 +0200

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: alan@idiocy.org,  67794@debbugs.gnu.org
> Date: Wed, 13 Dec 2023 17:04:39 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> [...]
> 
> > By contrast, lookup_image is called when a 'display' property is found
> > during _generation_ of those glyphs, before showing them for the first
> > time.
> 
> Yes but the glyph generation is not done for every face under the sun,
> right?  So this could be done "dynamically"?

Glyph generation uses the single face that's applicable to the buffer
or string whose glyphs are being generated.  That face is obtained by
merging all the faces in effect there (see "Displaying Faces" in the
ELisp manual for the details), but eventually this merging produces a
single face that is used for the glyph(s).

> If so, what would be a right place to have a call to lookup_image into
> mouse-highlight?  Is it "too late" for glyphs generation?

It's too late, yes.  mouse-highlight, as it currently works, doesn't
regenerate glyphs, it uses glyphs already present in the glyph
matrices.

Which is not to say we couldn't add calls to lookup_image there, but
that would need rather serious changes in show_mouse_face: it
currently just identifies the glyphs that need to be redrawn, but will
instead need to replace the image glyphs it finds with new ones (and
then maybe replace them back in clear_mouse_face?).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]