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

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

bug#47819: 8.0.50; When :height/:width image attribute is specified, :sc


From: Alan Third
Subject: bug#47819: 8.0.50; When :height/:width image attribute is specified, :scale factor is not applied
Date: Sat, 17 Apr 2021 09:23:55 +0100

On Fri, Apr 16, 2021 at 08:50:58PM +0200, David Ponce wrote:
> On 16/04/2021 20:14, Alan Third wrote:
> > On Fri, Apr 16, 2021 at 08:16:20AM +0200, David Ponce wrote:
> > > Hello,
> > > 
> > > For the image :scale attribute the Elisp reference manual say that:
> > > 
> > >       If both ‘:scale’ and ‘:height’/‘:width’ are
> > >       specified, the height/width will be adjusted by the specified
> > >       scaling factor.
> > > 
> > > It seems, however, that this is not true, when the :height or :width
> > > or both attributes of an image are specified, the :scale factor is not
> > > applied.
> > 
> > Hmm, I'm not sure which is the more desirable behaviour, but fixing it
> > to match the documentation appears to be trivial. See attached.
> > 
> 
> Hi Alan,
> 
> Your patch fixed the issue for me, and now the specified :scale factor
> is applied when the :height/:width attributes are specified.
> 
> IMHO, this is the right fix to be consistent with the
> documentation. At least because create-image apply a default scale
> factor, maybe for better rendering on high resolution
> screens. For ex., a default scale factor of 1.2 is applied on my
> laptop (1920x1080). Scaling could also make sense when height/width
> are specified in 'em'?

I don't know why you would want to use scale with em dimensions, since
you can just set the em dimensions directly.

For example ":scale 2 :height '(1 . em)" is exactly the same as
":scale 1 :height '(2 . em)", so why bother?

Plus if you specify something to be 1em in height, then create-image
applies its magic scale factor, you end up with something that is not
1em in height.

So yeah, I'm not convinced that this is behaviour we want.
-- 
Alan Third





reply via email to

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