aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-02-10 16:48:04 +1100
committerLars Magne Ingebrigtsen2015-02-10 16:48:04 +1100
commit6a319400ccb77f7783db793bbb114d8df47bde3e (patch)
tree58411eaa879c0d03ba1205010f45587307c0e03e
parent84d9c19319ac63550a2d45f6688825d9be716185 (diff)
downloademacs-6a319400ccb77f7783db793bbb114d8df47bde3e.tar.gz
emacs-6a319400ccb77f7783db793bbb114d8df47bde3e.zip
Fix <h1> and <tt> rendering
(shr-tag-h1): Don't use variable-pitch fonts on fontless rendering. (shr-tag-tt): New function.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/net/shr.el8
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d8cb245cbeb..c4c329ef5ce 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -32,6 +32,8 @@
32 (shr-pixel-buffer-width): New function. 32 (shr-pixel-buffer-width): New function.
33 (shr-render-td): Add a caching layer. 33 (shr-render-td): Add a caching layer.
34 (shr-dom-max-natural-width): New function. 34 (shr-dom-max-natural-width): New function.
35 (shr-tag-h1): Don't use variable-pitch fonts on fontless rendering.
36 (shr-tag-tt): New function.
35 37
362015-02-10 Fabián Ezequiel Gallina <fgallina@gnu.org> 382015-02-10 Fabián Ezequiel Gallina <fgallina@gnu.org>
37 39
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 06a75a46bf2..e929f48b5fd 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1168,6 +1168,10 @@ ones, in case fg and bg are nil."
1168(defun shr-tag-u (dom) 1168(defun shr-tag-u (dom)
1169 (shr-fontize-dom dom 'underline)) 1169 (shr-fontize-dom dom 'underline))
1170 1170
1171(defun shr-tag-tt (dom)
1172 (let ((shr-current-font 'default))
1173 (shr-generic dom)))
1174
1171(defun shr-parse-style (style) 1175(defun shr-parse-style (style)
1172 (when style 1176 (when style
1173 (save-match-data 1177 (save-match-data
@@ -1451,7 +1455,9 @@ The preference is a float determined from `shr-prefer-media-type'."
1451 (shr-generic dom)) 1455 (shr-generic dom))
1452 1456
1453(defun shr-tag-h1 (dom) 1457(defun shr-tag-h1 (dom)
1454 (shr-heading dom '(variable-pitch (:height 1.3 :weight bold)))) 1458 (shr-heading dom (if shr-use-fonts
1459 '(variable-pitch (:height 1.3 :weight bold))
1460 'bold)))
1455 1461
1456(defun shr-tag-h2 (dom) 1462(defun shr-tag-h2 (dom)
1457 (shr-heading dom 'bold)) 1463 (shr-heading dom 'bold))