From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pascal Quesseveur Newsgroups: gmane.emacs.help Subject: Re: Background color in SVG display Date: Thu, 23 Jun 2022 20:14:10 +0200 Organization: Les Enchantements de Miraldra Message-ID: <82r13fl025.fsf@gmail.com> References: <82czeznamq.fsf@gmail.com> <834k0bg8ww.fsf@gnu.org> <828rpnmzv6.fsf@gmail.com> <83letnek0c.fsf@gnu.org> <82zgi3lgkw.fsf@gmail.com> <83fsjvedk6.fsf@gnu.org> <82v8srl722.fsf@gmail.com> <83czeze54r.fsf@gnu.org> Reply-To: pquessev@gmail.com Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37467"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (windows-nt) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:FTYPownVoY25Fg1NJnKV1oqhArs= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 20:15:01 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4RM4-0009aC-LN for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 20:15:00 +0200 Original-Received: from localhost ([::1]:55138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4RM3-0003j6-8V for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 14:14:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4RLQ-0003iu-TG for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 14:14:20 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:41064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4RLP-0001Kt-Hy for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 14:14:20 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1o4RLN-0008bN-Hc for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 20:14:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Attribution: PQsr Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138031 Archived-At: >"EZ" == Eli Zaretskii writes: EZ> 2.2? Are you sure? That sounds very old. The latest stable EZ> version is 2.56, AFAIK. No I am not sure. As librsvg is named librsvg-2-2.dll I supposed it should be 2.2. But I looked in emacs 27.1 directory and librsvg is also librsvg-2.2.dll but the size is different. As version 27.1 was correct I copied librsvg from 27.1 to 28.1: display is always wrong in 28.1 so I suppose libsrvg is not the culprit. EZ> I cannot reproduce the problems you describe, but I'm not the EZ> expert on displaying SVG images. If you report a bug, it will EZ> be looked at by people who are experts. There's no need to EZ> worry about reporting a bug which eventually turns out not to be EZ> a bug. I know that but I'd rather be sure I understood the problem. EZ> AFAIU, in Emacs 28 and later you should be able to give a face EZ> text property to the part of the buffer that displays SVG EZ> image(s), and the background color of that face will be honored EZ> by the SVG display, provided that (a) your librsvg is recent EZ> enough, and (b) the SVG image itself doesn't specify a EZ> background color. splash.svg has no background. I have decided to advise create-image to set explictely image background color attribute: (setq image (nconc image (list :background color))) When color is a variant of grey, display seems ok. When it is #ff0000 background of displayed image is blue. And when #0000ff image background is red. When I set color attribute to #904020 I get a displayed color more or less similar to royalblue4 (#1a2f79). -- Pascal Quesseveur pquessev@gmail.com