Function: ps-face-attributes

ps-face-attributes is a byte-compiled function defined in ps-print.el.gz.

Signature

(ps-face-attributes FACE)

Documentation

Return face attribute vector.

If FACE is not in ps-print-face-extension-alist or in ps-print-face-alist, insert it on ps-print-face-alist and return the attribute vector.

If FACE is not a valid face name, use default face.

Source Code

;; Defined in /usr/src/emacs/lisp/ps-print.el.gz
(defun ps-face-attributes (face)
  "Return face attribute vector.

If FACE is not in `ps-print-face-extension-alist' or in
`ps-print-face-alist', insert it on `ps-print-face-alist' and
return the attribute vector.

If FACE is not a valid face name, use default face."
  (and (stringp face) (facep face) (setq face (intern face)))
  (cond
   (ps-black-white-faces-alist
    (or (and (symbolp face)
	     (cdr (assq face ps-black-white-faces-alist)))
	(vector 0 nil nil)))
   ((symbolp face)
    (cdr (or (assq face ps-print-face-extension-alist)
	     (assq face ps-print-face-alist)
	     (let* ((the-face (if (facep face) face 'default))
		    (new-face (ps-screen-to-bit-face the-face)))
	       (or (and (eq the-face 'default)
			(assq the-face ps-print-face-alist))
		   (setq ps-print-face-alist
			 (cons new-face ps-print-face-alist)))
	       new-face))))
   ((ps-face-foreground-color-p (car face))
    (vector 0 (ps-face-extract-color face) nil))
   ((ps-face-background-color-p (car face))
    (vector 0 nil (ps-face-extract-color face)))
   (t
    (vector 0 nil nil))))