From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#44065: 28.0.50; SVG image not shown completely Date: Sun, 25 Oct 2020 12:26:59 +0000 Message-ID: <867drexzho.fsf@gmail.com> References: <20201020123145.GG1166@breton.holly.idiocy.org> <30dde57d-9681-4cd7-9e60-beaee47914c6@www.fastmail.com> <20201020195444.GI1166@breton.holly.idiocy.org> <83ft67mth5.fsf@gnu.org> <20201021190346.GA47992@breton.holly.idiocy.org> <873626ij0n.fsf@gnus.org> <837drimnjq.fsf@gnu.org> <20201022191122.GA59267@breton.holly.idiocy.org> <86h7qkwvcg.fsf@gmail.com> <83a6wchzg8.fsf@gnu.org> <20201024170124.GD59267@breton.holly.idiocy.org> <838sbvh7xo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21756"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (windows-nt) To: 44065@debbugs.gnu.org Cancel-Lock: sha1:OUnIo2ZP6rWPonbgJPxxJl8rbxM= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 25 13:28:17 2020 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 1kWf8B-0005Y5-K5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Oct 2020 13:28:15 +0100 Original-Received: from localhost ([::1]:49460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWf8A-00073q-KX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Oct 2020 08:28:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWf7y-00073P-Sp for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2020 08:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWf7y-0005wS-I9 for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2020 08:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWf7y-0008Ub-Cz for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2020 08:28:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87pn5ga0wt.fsf@gmail.com> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Oct 2020 12:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44065 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160362883632586 (code B ref -1); Sun, 25 Oct 2020 12:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Oct 2020 12:27:16 +0000 Original-Received: from localhost ([127.0.0.1]:35911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWf7D-0008TW-T3 for submit@debbugs.gnu.org; Sun, 25 Oct 2020 08:27:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWf7C-0008TP-5r for submit@debbugs.gnu.org; Sun, 25 Oct 2020 08:27:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWf7B-0006hk-Fy for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2020 08:27:14 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:55116 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWf7A-0005sZ-1g for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2020 08:27:13 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kWf75-00048r-3V for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2020 13:27:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 08:13:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:191476 Archived-At: On Sat 24 Oct 2020, Eli Zaretskii wrote: >> Date: Sat, 24 Oct 2020 18:01:24 +0100 >> From: Alan Third >> Cc: Andy Moreton , 44065@debbugs.gnu.org >> >> On Sat, Oct 24, 2020 at 10:09:59AM +0300, Eli Zaretskii wrote: >> > >> > (We cannot just call a new function from an image library without >> > loading it from its DLL at run time on MS-Windows.) >> >> Ah, that's not something I was aware of. Thanks for fixing it. > > No sweat. And thanks for fixing the original problem to begin with. A new report in bug#44206 shows that this patch caused other problems. The docs for rsvg_handle_get_geometry_for_layer show it does not report minimum sizes, as it ignores clipping regions. Thus for an SVG file which contains a small clipping region applied to a larger image, the reported sizes are incorrect. Also, rsvg_handle_get_geometry_for_layer returns a gboolean, which the docs do not describe, but other API functions return TRUE for success and FALSE for failure. This should be checked. Running under gdb with the image from bug#44206 shows that the bounds reported by rsvg_handle_get_geometry_for_layer are zero (so the functions may have failed and returned FALSE). The original report here showed that rsvg_handle_get_dimensions did not alwyas return the correct results. It is documented to require a prior call to rsvg_handle_set_dpi to give correct results, but that is not called in image.c. Perhaps this can be fixed by reverting to the original code with addition of a call to rsvg_handle_set_dpi or rsvg_handle_set_dpi_x_y before calling rsvg_handle_get_dimensions. AndyM