GNU bug report logs - #77841
Some svg image's black color is replaced by emacs's theme foreground color

Previous Next

Package: emacs;

Reported by: Billy Lei <LeiYiXia29 <at> outlook.com>

Date: Wed, 16 Apr 2025 12:16:02 UTC

Severity: normal

Full log


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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Alan Third <alan <at> idiocy.org>
Cc: Ihor Radchenko <yantar92 <at> posteo.net>, 77841 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>, Billy Lei <LeiYiXia29 <at> outlook.com>
Subject: Re: bug#77841: Some svg image's black color is replaced by emacs's
 theme foreground color
Date: Tue, 27 May 2025 11:46:20 +0200
[Message part 1 (text/plain, inline)]
Alan Third <alan <at> idiocy.org> writes:

> On Sat, May 24, 2025 at 07:57:26PM +0200, Manuel Giraud wrote:
>> With this and the same SVG I provided, the foreground color of the text
>> is black using a light theme.  Using a dark theme, the foreground color
>> of the text is white...  So that seems to do the trick.
>
> Excellent, thanks.
>
> I've pushed a branch scratch/svg-colors with the various fixes. Can
> you please check it's working as you'd expect?

Thanks!  Here is series of screenshot with emacs -Q from this branch
that illustrates all the correct (IMO) features: SVG images keeps the
default black, Emacs "widgets" follow the theme, DocView could follow
the theme if the user wants.

The first screenshot is with a light theme (modus-operandi).  The second
screenshot is with a dark theme (modus-vivendi) and the last screenshot
is with the same dark theme after having set `doc-view-svg-face' to
"inherit from default" only.

[2025-05-27T11:25+0200.png (image/png, inline)]
[2025-05-27T11:26+0200.png (image/png, inline)]
[2025-05-27T11:28+0200.png (image/png, inline)]
[Message part 5 (text/plain, inline)]
I'll try to test with librsvg < 1.48... but I don't have it at hand.
-- 
Manuel Giraud

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.