;; of the current face, like (N . width). That way, the
;; indentation is calculated correctly when using
;; `text-scale-adjust'.
- `(space :width (,(if-let ((font (font-at (1- (point))))
- (info (query-font font)))
- (/ (float shr-indentation) (aref info 7))
- shr-indentation)
+ `(space :width (,(/ (float shr-indentation)
+ (if-let (((eq (window-buffer) (current-buffer)))
+ (font (font-at (1- (point))))
+ (info (query-font font)))
+ (aref info 7)
+ (string-pixel-width " ")))
. width))))
(put-text-property start (+ (point) prefix)
'shr-prefix-length (+ prefix (- (point) start))))))