bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44655: 28.0.50; Oversized SVG margin


From: Alan Third
Subject: bug#44655: 28.0.50; Oversized SVG margin
Date: Sat, 4 Dec 2021 10:46:50 +0000

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]