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 17:53:52 +0200 Message-ID: References: <83o7jnwfd3.fsf@gnu.org> <835y5vw1ay.fsf@gnu.org> <83350yvd5f.fsf@gnu.org> 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="37582"; 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 17:54:12 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 1qSJbY-0009aT-0K for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Aug 2023 17:54:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSJbQ-0002vT-GP; Sat, 05 Aug 2023 11:54:04 -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 1qSJbO-0002v5-UK for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 11:54: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 1qSJbO-00065b-M8 for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSJbO-0004uN-Hj for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 11:54:02 -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 15:54:02 +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.169125083918858 (code B ref 64908); Sat, 05 Aug 2023 15:54:02 +0000 Original-Received: (at 64908) by debbugs.gnu.org; 5 Aug 2023 15:53:59 +0000 Original-Received: from localhost ([127.0.0.1]:57982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSJbL-0004u6-Ds for submit@debbugs.gnu.org; Sat, 05 Aug 2023 11:53:59 -0400 Original-Received: from smtp-18.smtpout.orange.fr ([80.12.242.18]:49187 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSJbI-0004tv-9m for 64908@debbugs.gnu.org; Sat, 05 Aug 2023 11:53:58 -0400 Original-Received: from [192.168.1.15] ([2.7.71.181]) by smtp.orange.fr with ESMTPA id SJbEqBrahKn2vSJbEq4IDq; Sat, 05 Aug 2023 17:53:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1691250834; bh=H2PLvvb4dwLEmLisN1XoLR3s99xAI2hJMdpQg/eHOSg=; h=Date:Subject:To:References:From:In-Reply-To; b=pqIpNADhWxcAtCUy+tqb42WI8uWfGntX/SXpylm4UoJCB/oVfnG7M8OFqQ+u54KtX qJ2mWqwoch2v6ljkobwjgTZnDHVN3P5s+JmXEXmqRa7E7w6kc3+3rW8oqu8q3EbHA/ tOFvf4UCNDH036ZIzRE2hK2n/Mh+zGZXoJB8z1V1tsV6Rr/jXDHLjJJEtOUheU5g9o GSeWGqqsrU8eGBOGgViHPfLVvQDjbXfFHIB8qWhS9th04IrLYbu2KDnOvRsy4qvydW IS86L6Lk0sCydNXyzeZQuG9xceJRiDqCR3+5g16Qn5wUY0kVR+t+IPv7R3yUYnTqS4 kVi+DjejtEdoQ== X-ME-Helo: [192.168.1.15] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 05 Aug 2023 17:53:54 +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:266794 Archived-At: On 05/08/2023 17:14, Alan Third wrote: > On Sat, Aug 05, 2023 at 02:32:07PM +0200, David Ponce wrote: >> On 05/08/2023 11:58, Alan Third wrote: >> I did test your V2 patch, and it seems to work well. >> I tend to agree with your reasoning, even if I am not enough a >> librsvg expert to fully understand all the details. > > Thanks! > >> One case however is not working, when the svg image just specify >> percentage for width and height without a viewbox, like this: >> >> '(image :type svg :data >> " >> >> >> >> > style=\"fill:currentColor;fill-opacity:1;stroke:none\" >> d=\"m7.707031 3l-.707031.707031 6.125 6.125 1.167969 1.167969-1.167969 1.167969-6.125 6.125.707031.707031 6.125-6.125 1.875-1.875-1.875-1.875-6.125-6.125\" >> class=\"ColorScheme-Text\" >> /> >> " >> :scale 1) >> >> I can display a such image in firefox, gwenview, or inkscape, but not in Emacs. >> I guess it works in applications that provide a default viewbox when not defined. >> And it is failing in Emacs because no default viewbox is provided. > > Very strange, it works here. rsvg_handle_get_geometry_for_layer should > handle this fine. I wonder if something subtle has changed with > 2.56... I can't fine anything in the documentation to say this has > changed... > > We can always provide an absolute fallback of 100x100 or something. I > think that's what we used to do. But it would be good to know if > something is actually broken here. Are you able to check the return > value of rsvg_handle_get_geometry_for_layer and see if it's throwing > up an error? Using this image spec: '(image :type svg :data " " :scale 1 :width 22 :height 22) rsvg_handle_get_geometry_for_layer returns 1, and insert-image displays a black square of 22x22 pixels.