GNU bug report logs -
#77841
Some svg image's black color is replaced by emacs's theme foreground color
Previous Next
Full log
View this message in rfc822 format
On Sat, Apr 19, 2025 at 08:57:55AM +0000, Ihor Radchenko wrote:
> Alan Third <alan <at> idiocy.org> writes:
>
> >> Yes, this is a feature. I think to disable it, you need to include a
> >> :background setting in the image spec. Alan, am I right?
> >
> > Yes, but in this particular case :foreground, probably.
> >
> > This behaviour is documented in the elisp manual under "SVG Images"
> > and is intended to make it easier to insert images into buffers so
> > they look like native widgets and the like.
>
> I am still confused.
> Consider the attached svg image.
>
> If I emacs -Q org-ltximg_404bde694c76aad6deecfc21e91c044a6afd7948.svg
> I see black background and white foreground.
>
> If I
> 1. emacs -Q
> 2. (put-text-property 1 2 'display (create-image "/tmp/ltximg/org-ltximg_404bde694c76aad6deecfc21e91c044a6afd7948.svg"))
> I see red-ish background and white foreground.
>
> Seemingly, background and foreground are inverted in the second case.
>
> What am I missing?
The image draws a rectangle in the current foreground colour, black in
the first case and red in the second, and then fills the text with
"#fff".
<g fill='#fff'>
--
Alan Third
This bug report was last modified 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.