From 3ad842c0a4d9a19bb71e3341072a5b3062bbc6f5 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 31 May 2011 21:36:03 +0200 Subject: [PATCH] (shr-rescale-image): Add an :ascent of 100 to images so that the underline comes at the bottom. --- lisp/ChangeLog | 5 +++++ lisp/shr.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d141f93c..a62ef4280 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-05-31 Lars Magne Ingebrigtsen + + * shr.el (shr-rescale-image): Add an :ascent of 100 to images so that + the underline comes at the bottom. + 2011-05-31 Teodor Zlatanov * gnus-registry.el (gnus-registry-article-marks-to-chars): Rename from diff --git a/lisp/shr.el b/lisp/shr.el index c5506d916..93aa7bca7 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -534,7 +534,7 @@ the URL of the image to the kill buffer instead." (if (or (not (fboundp 'imagemagick-types)) (not (get-buffer-window (current-buffer)))) (create-image data nil t) - (let* ((image (create-image data nil t)) + (let* ((image (create-image data nil t :ascent 100)) (size (image-size image t)) (width (car size)) (height (cdr size)) @@ -553,11 +553,13 @@ the URL of the image to the kill buffer instead." (when (> (car size) window-width) (setq image (or (create-image data 'imagemagick t - :width window-width) + :width window-width + :ascent 100) image))) (when (and (fboundp 'create-animated-image) (eq (image-type data nil t) 'gif)) - (setq image (create-animated-image data 'gif t))) + (setq image (create-animated-image data 'gif t + :ascent 100))) image))) ;; url-cache-extract autoloads url-cache. -- 2.25.1