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#44655: 28.0.50; Oversized SVG margin Date: Sat, 4 Dec 2021 10:46:50 +0000 Message-ID: References: <757bb5f2e5c43762717c5b1f8a0d3083c6e01607.camel@gmail.com> <201c26ed-10bb-40ac-b8a9-c0dcbd85e6f0@cs.ucla.edu> <6611b908-6960-7ca5-9985-5e3b6a9bf210@cs.ucla.edu> 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="24648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44655@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 04 11:47:18 2021 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 1mtSZZ-00066s-63 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 11:47:17 +0100 Original-Received: from localhost ([::1]:57512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtSZX-0008KB-IC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 05:47:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtSZK-0008Jh-Bh for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 05:47:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtSZK-0008Am-3h for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 05:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtSZJ-0007zg-WB for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 05:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Dec 2021 10:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44655 X-GNU-PR-Package: emacs Original-Received: via spool by 44655-submit@debbugs.gnu.org id=B44655.163861481930719 (code B ref 44655); Sat, 04 Dec 2021 10:47:01 +0000 Original-Received: (at 44655) by debbugs.gnu.org; 4 Dec 2021 10:46:59 +0000 Original-Received: from localhost ([127.0.0.1]:52962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtSZH-0007zO-38 for submit@debbugs.gnu.org; Sat, 04 Dec 2021 05:46:59 -0500 Original-Received: from outbound.soverin.net ([116.202.126.228]:59267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtSZF-0007zD-S9 for 44655@debbugs.gnu.org; Sat, 04 Dec 2021 05:46:58 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 6DC5C81F; Sat, 4 Dec 2021 10:46:52 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1638614811; bh=9ogSRsnmJVoyaCIKDMAmKoIFZyJ2z2DjrLcEMpOPXkc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RSiEnrDoUwlF8WLrHNPFqnG+MyldDvQPp4ZOGE+pQhaViCj6aKNnR4Wv/6708+EBd MMbb94Hi5G4cFofMo56UWiV12Mc8PJpA7Hjq7qMdJwlxL1kl6Ys9iC6WkToCe6qx/V CpENdy2GJT0ojT1uPK2n9dTJYSbjeovtmz9I993bNnZJEdOApiiFhivGyKz7wmWQ+2 1uJxDju/q3QIhwbLFVSNiKa7tF5cOazag4PBq2swepDa+0BWBPpaP3OQ8G1eMe0dmq gWCgzyhqs907L2Xv+T49mTOdHbdXb3BteZWLZKbpqxzbU3YnrlAfDrxdcvPYyIMrzU uMSRgmfnimBLA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1mtSZ8-0014au-4D; Sat, 04 Dec 2021 10:46:50 +0000 Mail-Followup-To: Alan Third , Paul Eggert , 44655@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <6611b908-6960-7ca5-9985-5e3b6a9bf210@cs.ucla.edu> 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:221456 Archived-At: On Fri, Dec 03, 2021 at 10:45:55AM -0800, Paul Eggert wrote: > On 11/6/21 05:55, Alan Third wrote: > > > There seems to be a lot of churn in the librsvg API at the moment, and > > their documentation isn't keeping up as it still doesn't mark > > rsvg_handle_get_dimensions as deprecated. > > > > It appears they've introduced rsvg_handle_get_intrinsic_size_in_pixels > > which does the same thing (but better) than my sizing code, but anyone > > using librsvg 2.46-2.52, which is probably most people for now, can't > > use it and probably don't want to use the old scheme, so I expect > > there's no point replacing my code at the moment. > > If it improves on your code then let's try using it for bleeding-edge > librsvg (2.52.0+). > > > > Perhaps what we should do is move the final "else" section of the > > previous code block (where rsvg_handle_get_geometry_for_layer is > > called) into its own block which is executed > > > > if (viewbox_width == 0 || viewbox_height == 0) > > > > instead of only in the case where rsvg_handle_get_intrinsic_dimensions > > fails to return any dimensions. That way we should have *some* > > dimensions without having to call rsvg_handle_get_dimensions. > > I installed a patch into master to do that, along with other patches to try > using svg_handle_get_intrinsic_size_in_pixels with bleeding-edge librsvg, > and to catch some potential integer overflow problems I noticed while doing > all this (see attached). This all looks good to me. Thanks! -- Alan Third