Function: hfy-face-to-style

hfy-face-to-style is a byte-compiled function defined in htmlfontify.el.gz.

Signature

(hfy-face-to-style FN)

Documentation

Take FN, a font or defface style font specification,
(as returned by face-attr-construct or hfy-face-attr-for-class)
and return a hfy-style-assoc.

See also hfy-face-to-style-i, hfy-flatten-style.

Source Code

;; Defined in /usr/src/emacs/lisp/htmlfontify.el.gz
(defun hfy-face-to-style (fn)
  "Take FN, a font or `defface' style font specification,
\(as returned by `face-attr-construct' or `hfy-face-attr-for-class')
and return a `hfy-style-assoc'.

See also `hfy-face-to-style-i', `hfy-flatten-style'."
  ;;(message "hfy-face-to-style");;DBUG
  (let* ((face-def (hfy-face-resolve-face fn))
         (final-style
          (hfy-flatten-style (hfy-face-to-style-i face-def))))
    ;;(message "%S" final-style)
    (if (not (assoc "text-decoration" final-style))
        (progn (setq final-style
                     ;; Fix-me: there is no need for this since
                     ;; text-decoration is not inherited.
                     ;; but it's not wrong and if this ever changes it will
                     ;; be needed, so I think it's better to leave it in? -- v
                     (push '("text-decoration" . "none") final-style))))
    final-style))