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 10:30:38 +0200 Message-ID: References: <83o7jnwfd3.fsf@gnu.org> <835y5vw1ay.fsf@gnu.org> <83350yvd5f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------AXDVOnDmCZCVLaoxyxsd0gEh" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28067"; 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 Cc: 64908@debbugs.gnu.org To: Eli Zaretskii , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 05 10:31:26 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 1qSCh4-0007AG-3S for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Aug 2023 10:31:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSCgj-0003Jy-Ra; Sat, 05 Aug 2023 04:31:05 -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 1qSCgg-0003If-U0 for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 04:31:03 -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 1qSCgg-0003b6-Ld for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 04:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSCgf-0006i7-VP for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 04:31: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 08:31: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.169122424425771 (code B ref 64908); Sat, 05 Aug 2023 08:31:01 +0000 Original-Received: (at 64908) by debbugs.gnu.org; 5 Aug 2023 08:30:44 +0000 Original-Received: from localhost ([127.0.0.1]:55445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSCgO-0006hb-4N for submit@debbugs.gnu.org; Sat, 05 Aug 2023 04:30:44 -0400 Original-Received: from smtp-22.smtpout.orange.fr ([80.12.242.22]:53980 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSCgL-0006hQ-7C for 64908@debbugs.gnu.org; Sat, 05 Aug 2023 04:30:42 -0400 Original-Received: from [192.168.1.15] ([2.7.71.181]) by smtp.orange.fr with ESMTPA id SCgIqg4InvliPSCgIqU8vk; Sat, 05 Aug 2023 10:30:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1691224239; bh=5wU6AYPeAzqdatsx4N80vPptNbnva3ZOYG4tbecOO0U=; h=Date:Subject:From:To:Cc:References:In-Reply-To; b=C0Aqu+siEhx1Rx9zf1sT5FKO082U4KscXK0rKVtyHHOjOT0Vrh/o+Ga9TEZiCZ4XL vWwcmgN31TsDhKdWQR2i+UdX7hTVR7OUPOuGzRWLlXw2e3hoOLCeHuQE2S8BKs2G4M rVi8t3bVuaB1q1aQFtjWpNSsFUuei4c6zMFecUZ/9NGV/8bETMY79By+87CWmbNKUn Uoj9t4DUmUrWXjWhEa1NfSQCyQHqM1SynOT3w3SSOn+gZaC1n5rfrFXtEkU3BXGbtj GONWTsY0syRnd2tOPZ+PZH7BxNlJW5RJYvLFdbakOCtpVOckrVeSP0didKCzHfSclC pwfRe5f6rypFQ== X-ME-Helo: [192.168.1.15] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 05 Aug 2023 10:30:39 +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:266741 Archived-At: This is a multi-part message in MIME format. --------------AXDVOnDmCZCVLaoxyxsd0gEh Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 04/08/2023 23:08, David Ponce wrote: > On 04/08/2023 21:08, Eli Zaretskii wrote: >>> Date: Fri, 4 Aug 2023 19:32:13 +0100 >>> From: Alan Third >>> Cc: David Ponce , 64908@debbugs.gnu.org >>> >>> On Fri, Aug 04, 2023 at 01:26:45PM +0300, Eli Zaretskii wrote: >>>> >>>> Thanks.  I hope this will help an SVG expert to figure out what's >>>> going on with these images. >>>> >>>> Alan, do you have time to look into this, per chance? >>> >>> Yeah. I know roughly what needs to be done here thanks to David's most >>> recent email, but I'll have a wee think about how best to do it since >>> we already have, I think, three different methods of finding the image >>> size depending on the version of librsvg. If I can merge a couple of >>> those approaches it will probably be best. >> >> Thanks in advance. > > Eli, Alan, > > Until Alan finds the best solution, the attached simple patch fixed > the issue for me with librsvg 2.56.3. > > Thanks & Regards Hello, I attached a better patch, because it is possible to have svg image definition that combines viewBox, and percentage of width/height, like in this example: (insert-image '(image :type svg :data " " :scale 1)) I hope Alan will find a simpler implementation for all these cases! Thanks & Regards --------------AXDVOnDmCZCVLaoxyxsd0gEh Content-Type: text/x-patch; charset=UTF-8; name="image.c.patch" Content-Disposition: attachment; filename="image.c.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9pbWFnZS5jIGIvc3JjL2ltYWdlLmMKaW5kZXggY2I5NzI1ODky ZDEuLmFlMjRmNWIzODkzIDEwMDY0NAotLS0gYS9zcmMvaW1hZ2UuYworKysgYi9zcmMvaW1h Z2UuYwpAQCAtMTEzNTgsMTIgKzExMzU4LDE2IEBAIHN2Z19sb2FkX2ltYWdlIChzdHJ1Y3Qg ZnJhbWUgKmYsIHN0cnVjdCBpbWFnZSAqaW1nLCBjaGFyICpjb250ZW50cywKIAogICAgICAg aWYgKGhhc193aWR0aCAmJiBoYXNfaGVpZ2h0KQogCXsKKwkgIAogCSAgLyogU3VjY2VzcyEg IFdlIGNhbiB1c2UgdGhlc2UgdmFsdWVzIGRpcmVjdGx5LiAgKi8KLQkgIHZpZXdib3hfd2lk dGggPSBzdmdfY3NzX2xlbmd0aF90b19waXhlbHMgKGl3aWR0aCwgZHBpLAotCQkJCQkJICAg IGltZy0+ZmFjZV9mb250X3NpemUpOwotCSAgdmlld2JveF9oZWlnaHQgPSBzdmdfY3NzX2xl bmd0aF90b19waXhlbHMgKGloZWlnaHQsIGRwaSwKLQkJCQkJCSAgICAgaW1nLT5mYWNlX2Zv bnRfc2l6ZSk7Ci0KKwkgIHZpZXdib3hfd2lkdGggPSAoKGl3aWR0aC51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