From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#67794: 30.0.50; mouse-face is not respected on SVG images Date: Wed, 20 Dec 2023 13:54:11 +0000 Message-ID: References: <87msu6tl80.fsf@ledu-giraud.fr> <83cyv2ibtr.fsf@gnu.org> <87il4utjg0.fsf@ledu-giraud.fr> <835y0uia3k.fsf@gnu.org> <87edfitia2.fsf@ledu-giraud.fr> <831qbii811.fsf@gnu.org> <87a5q6tfxb.fsf@ledu-giraud.fr> <83zfy6gq9j.fsf@gnu.org> <87edfhuuob.fsf@ledu-giraud.fr> <83o7elggf2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 67794@debbugs.gnu.org, Manuel Giraud To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 20 14:55:24 2023 Return-path: Envelope-to: geb-bug-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 1rFx2h-0008vL-0q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Dec 2023 14:55:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFx2L-0008Bz-Ow; Wed, 20 Dec 2023 08:55:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFx2K-0008Bi-By for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2023 08:55:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rFx2K-0000Bg-3W for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2023 08:55:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFx2N-0003v7-9k for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2023 08:55:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Dec 2023 13:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67794 X-GNU-PR-Package: emacs Original-Received: via spool by 67794-submit@debbugs.gnu.org id=B67794.170308046814977 (code B ref 67794); Wed, 20 Dec 2023 13:55:03 +0000 Original-Received: (at 67794) by debbugs.gnu.org; 20 Dec 2023 13:54:28 +0000 Original-Received: from localhost ([127.0.0.1]:38915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFx1n-0003tU-TB for submit@debbugs.gnu.org; Wed, 20 Dec 2023 08:54:28 -0500 Original-Received: from dane.soverin.net ([185.233.34.149]:36767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFx1k-0003tF-B5 for 67794@debbugs.gnu.org; Wed, 20 Dec 2023 08:54:26 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4SwFRB5lffzyRj; Wed, 20 Dec 2023 13:54:14 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4SwFR850C3z6Q; Wed, 20 Dec 2023 13:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1703080454; bh=bK6p+l+sDGCoNJ7g/NQx0UpTQblQphi4WtfYgv4Dj7s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AdAnbJlNy79N6YqzqO7Lvw5l1mZV7FEQRo6EYTax6tWIriZ/LFJoy7TeyOxX+8fN1 bCqJrVt/HamM+KEPg3rMlX9SwdVUecud+iA8K1RUG9KOju+twQqYj7UA0VrpV4f21M Q4VbjPadnskggD8uaoxuEY1GE2Us28mdtOihSa+rJ/9xkEvG/1o/Bm+BXBST9MFxZT F6/u+oACbGKQeaX0oSgGMPdD5nZXep2o7G8HSplvTq+z8AHxslpgueB3tEeJXyDIl0 xPo84X5K7oo0NW6VLmAS+OyB9zERvlMDQ5Q/AOpDXGmeTOYl6O/85aNIOMuxLOqV4L mrniYPbkMr96w== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.96) (envelope-from ) id 1rFx1X-000OLI-0G; Wed, 20 Dec 2023 13:54:11 +0000 Mail-Followup-To: Alan Third , Eli Zaretskii , Manuel Giraud , gerd.moellmann@gmail.com, 67794@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <83o7elggf2.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276563 Archived-At: On Wed, Dec 20, 2023 at 03:19:29PM +0200, Eli Zaretskii wrote: > > I'm using librsvg 2.57 and I could not easily test it with an older > > version. > > Alan, is the trick with wrapping SVG with another one supposed to work > with all versions of librsvg? Yes. > I see some version conditions in > svg_load_image, but I'm not sure I understand the consequences. It's quite complex because the librsvg API has changed a lot over the last few years. Generally we try to use as many features of librsvg as possible for each version. So, for example 2.52 and above allow us to ask directly the size of the image (the most accurate way), 2.48 requires us to do more calculations and below 2.48 we need to actually generate the rasterized image and get it's size from that. > Specifically, what does this code do: > > #if LIBRSVG_CHECK_VERSION (2, 48, 0) > rsvg_handle_set_stylesheet (rsvg_handle, (guint8 *)css, strlen (css), NULL); > #endif > > It is only used for librsvg 2.48 and later. This sets a CSS stylesheet which contains the font and font size. It's only used on 2.48+ because that's when it was introduced. There is a previous call to the same function that has more explanation. There are two calls because we need to set up the SVG, parse it, get it's size, then wrap it, set up the wrapped version and parse again before finally rasterizing. > And for librsvg older than 2.32, it looks like we don't use the > wrapped SVG at all? I think we do. The #if/#endif's are hard to follow, but I'm sure the wrapper is used in all versions. IIRC the main difference between 2.32 and older versions is the initial setup of the SVG handle. I'll see if I can come up with some better comments. -- Alan Third