From eab35f39222d075677e012469bf612e4fbb31caa Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 25 Jun 2013 23:59:48 -0700 Subject: [PATCH] * lisp/htmlfontify.el (hfy-triplet): Handle unspecified-fg, bg. (hfy-size): Handle ttys. Fixes: debbugs:14668 --- lisp/ChangeLog | 3 +++ lisp/htmlfontify.el | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c43c23fa5d..7aa962b9ada 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-06-26 Glenn Morris + * htmlfontify.el (hfy-triplet): Handle unspecified-fg, bg. + (hfy-size): Handle ttys. (Bug#14668) + * info-xref.el: Update for Texinfo 5 change in *note format. (info-xref-node-re, info-xref-note-re): New constants. (info-xref-check-buffer): Use info-xref-note-re. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 768dda993e2..3de2b1a65e6 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -748,6 +748,10 @@ if you've redefined white, (esp. if you've redefined it to have a triplet member lower than that of the color you are processing) strange things may happen." ;;(message "hfy-colour-vals");;DBUG + ;; TODO? Can we do somehow do better than this? + (cond + ((equal colour "unspecified-fg") (setq colour "black")) + ((equal colour "unspecified-bg") (setq colour "white"))) (let ((white (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals "white"))) (rgb16 (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals colour)))) (if rgb16 @@ -773,6 +777,8 @@ may happen." "Derive a CSS font-size specifier from an Emacs font :height attribute HEIGHT. Does not cope with the case where height is a function to be applied to the height of the underlying font." + ;; In ttys, the default face has :height == 1. + (and (not (display-graphic-p)) (equal 1 height) (setq height 100)) (list (cond ;;(t (cons "font-size" ": 1em")) -- 2.39.2