Function: htmlize-face-to-fstruct-1
htmlize-face-to-fstruct-1 is a byte-compiled function defined in
htmlize.el.
Signature
(htmlize-face-to-fstruct-1 FACE)
Documentation
Convert Emacs face FACE to fstruct, internal.
Source Code
;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defun htmlize-face-to-fstruct-1 (face)
"Convert Emacs face FACE to fstruct, internal."
(let ((fstruct (make-htmlize-fstruct
:foreground (htmlize-color-to-rgb
(htmlize-face-foreground face))
:background (htmlize-color-to-rgb
(htmlize-face-background face)))))
;; GNU Emacs
(dolist (attr '(:weight :slant :underline :overline :strike-through))
(let ((value (face-attribute face attr nil t)))
(when (and value (not (eq value 'unspecified)))
(htmlize-face-set-from-keyword-attr fstruct attr value))))
(let ((size (htmlize-face-size face)))
(unless (eql size 1.0) ; ignore non-spec
(setf (htmlize-fstruct-size fstruct) size)))
(setf (htmlize-fstruct-css-name fstruct) (htmlize-face-css-name face))
fstruct))