Subject: Re: bug#45124: Subject: 27.1; Image rendered from svg is too small on a hdpi display

From: Alan Third <[email-masked]>
Date: Sat, 12 Dec 2020 10:47:32 +0000

On Wed, Dec 09, 2020 at 12:08:20AM +0000, Alan Third wrote:
> On Tue, Dec 08, 2020 at 08:28:43PM +0200, Dov Grobgeld wrote:
> > When loading an svg file into emacs by find file, e.g. the attached file
> > inkscape-drawing.svg, it is not rendered by the active x11 resolution. The
> > svg file has a native size of about 173.mm, but when loaded into emacs, its
> > width becomes about 95mm. My monitor is a 4k 27" screen which has a dpi of
> > about 163. It thus appears that the svg file is rendered at 90 dpi, since
> > 90/167*173 ≈ 95.
> > 
> > Note that xdpinfo properly returns:
> > 
> >   resolution:    162x161 dots per inch
> 
> Something like the attached (patch against the master branch) might do
> the trick...
> 
> This makes everything smaller on macOS, which isn't great because on
> my laptop everything is already too small. I'm not sure what we'd have
> to do to get SVGs rendering at roughly the right size.

I've pushed this change to the master branch. If it doesn't solve your
problem please reply to this email and we can reopen the bug report.
-- 
Alan Third