[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that
From: |
Lars Ingebrigtsen |
Subject: |
bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor |
Date: |
Mon, 08 Feb 2016 18:25:46 +1100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> And the new variable is called image-scaling-factor.
And this is now implemented, documented and pushed. Feel free to tweak
the logic. :-)
This defaults to 'auto, which means that it uses the dubious heuristic
"a character on a 'normal' screen is 10 pixels wide".
(defun image-compute-scaling-factor (scaling)
(cond
((numberp image-scaling-factor)
image-scaling-factor)
((eq image-scaling-factor 'auto)
(let ((width (/ (float (window-width nil t)) (window-width))))
;; If we assume that a typical character is 10 pixels in width,
;; then we should scale all images according to how wide they
;; are. But don't scale images down.
(if (< width 10)
1
(/ (float width) 10))))
(t
(error "Invalid scaling factor %s" image-scaling-factor))))
I don't have any statistics to back that up, though. Anybody have any
feelings on the "10" thing?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Lars Ingebrigtsen, 2016/02/08
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor,
Lars Ingebrigtsen <=
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Lars Ingebrigtsen, 2016/02/08
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Michael Heerdegen, 2016/02/08
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Lars Ingebrigtsen, 2016/02/08
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Lars Ingebrigtsen, 2016/02/08
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Drew Adams, 2016/02/08
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Michael Heerdegen, 2016/02/09
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Lars Ingebrigtsen, 2016/02/09
- bug#22172: 25.1.50; Wishlist: There should be a way to say to Emacs that is should rescale all images with a certain factor, Lars Ingebrigtsen, 2016/02/09