From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Ponce Newsgroups: gmane.emacs.bugs Subject: bug#64908: 29.1; svg parse failure Date: Sat, 5 Aug 2023 22:04:20 +0200 Message-ID: References: <6fa9c98e-e7ce-33de-c21d-bb36ab8687da@orange.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23430"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: Alan Third , Eli Zaretskii , 64908@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 05 22:05:18 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 1qSNWX-0005pp-Rl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Aug 2023 22:05:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSNWN-0002ix-BT; Sat, 05 Aug 2023 16:05:07 -0400 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 1qSNWI-0002gv-R1 for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 16:05:02 -0400 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 1qSNWI-0003iH-HG for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 16:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSNWH-0005kc-VA for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 16:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2023 20:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64908 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible Original-Received: via spool by 64908-submit@debbugs.gnu.org id=B64908.169126586622061 (code B ref 64908); Sat, 05 Aug 2023 20:05:01 +0000 Original-Received: (at 64908) by debbugs.gnu.org; 5 Aug 2023 20:04:26 +0000 Original-Received: from localhost ([127.0.0.1]:58244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSNVi-0005jl-3V for submit@debbugs.gnu.org; Sat, 05 Aug 2023 16:04:26 -0400 Original-Received: from smtp-26.smtpout.orange.fr ([80.12.242.26]:51075 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSNVf-0005jY-7E for 64908@debbugs.gnu.org; Sat, 05 Aug 2023 16:04:24 -0400 Original-Received: from [192.168.1.15] ([2.7.71.181]) by smtp.orange.fr with ESMTPA id SNVcq4I6KZ2imSNVcqI6xy; Sat, 05 Aug 2023 22:04:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1691265861; bh=pFM3htkXz0AT2iARLw82VlLrQKva3jOQdE/0SQWm2CI=; h=Date:Subject:To:References:From:In-Reply-To; b=Nm9HPywjw1nS7tULLni/JvifI5yTLPjYPQuZql2ByQ+ZFtz4z+2Trm9SylwMO+Uen T8czUZHCdCn/+ufnuiskTy2DRcx3O/w7GleNpwU/Yx4vyy6Ed5VTQK0JY/5QVfa+8e evmp8rRElLXj3elSP7pKApYDQKN/0m5Ke4MFtN+Z1aHT7W3zuG1wFjOSgQ09+Or25d LJzXfg14S7sdWgTTGAjoFbwCuSM82FapqzSTq906zwJAZ6Y7I9JZYApmIpFn5uSDx7 F77wMtZtmjPHyg8TD1VLKOl+gyuGBD3FStEpSWcOcChkC0xtYe7aXEXBlyp+75fhBY SidDnFg0dKlzQ== X-ME-Helo: [192.168.1.15] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 05 Aug 2023 22:04:21 +0200 X-ME-IP: 2.7.71.181 Content-Language: fr, en-US In-Reply-To: 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:266813 Archived-At: On 05/08/2023 20:31, Alan Third wrote: > On Sat, Aug 05, 2023 at 08:00:17PM +0200, David Ponce wrote: >> On 05/08/2023 19:39, Alan Third wrote: >>> On Sat, Aug 05, 2023 at 07:37:01PM +0200, David Ponce wrote: >>>> >>>> I just tried patch V3, and the result is the same: >>>> insert-image produces the same black square of 22x22 pixels. >>> >>> Can you try changing the initialisation of zero_rect to {0, 0, 10, >>> 10}? >>> >>> I remember a lot of trial and error with this originally, and it looks >>> like they may have changed how it works. >> >> It is better :-) >> >> Before call to rsvg_handle_get_geometry_for_layer: >> >> (gdb) print zero_rect >> $1 = {x = 0, y = 0, width = 10, height = 10} >> (gdb) print viewbox >> $2 = {x = 6.9533474147268633e-310, y = 2.3106462124703418e-319, width = 5.8283471538673388e-315, height = 9.8813129168249309e-323} >> (gdb) print out_logical_rect >> $3 = {x = 6.9533558057749482e-310, y = 6.9533473517748961e-310, width = 1.4821969375237396e-323, height = 3.0586981611317814e-317} >> >> After call: >> >> (gdb) print $eax >> $4 = 1 >> (gdb) print zero_rect >> $5 = {x = 0, y = 0, width = 10, height = 10} >> (gdb) print viewbox >> $6 = {x = 7, y = 3, width = 8.70703125, height = 16} >> (gdb) print out_logical_rect >> $7 = {x = 7, y = 3, width = 8.70703125, height = 16} >> >> Now I see the image, aligned at bottom right on the line (see the screenshot). > > OK. I really don't understand how this works, and I'm sure some older > version of librsvg required a viewport of zero size, but I don't know > which, so this is all a bit of a stab in the dark. Anyway, patch > attached with a viewport that is hopefully big enough for all the SVGs > we'll ever see. :) > With this last patch V4, insert-image works well for the various SVG images I tested. Centering image on the line using the :ascent center property works well too. The situation is far better now :-) Thank you very much!