Function: ps-mule-get-font-spec

ps-mule-get-font-spec is a byte-compiled function defined in ps-mule.el.gz.

Signature

(ps-mule-get-font-spec CHAR FONT-SPEC-TABLE FONT-SPEC)

Documentation

Return a font spec for printing CHAR with FONT-SPEC-TABLE.

FONT-SPEC, if non-nil, is a font spec to try at first.

See the documentation of ps-mule-font-spec-tables for the format of font spec.

Source Code

;; Defined in /usr/src/emacs/lisp/ps-mule.el.gz
(defsubst ps-mule-get-font-spec (char font-spec-table font-spec)
  "Return a font spec for printing CHAR with FONT-SPEC-TABLE.

FONT-SPEC, if non-nil, is a font spec to try at first.

See the documentation of `ps-mule-font-spec-tables' for the
format of font spec."

  (or (aref font-spec-table char)
      (aset font-spec-table char
	    (or (and (< char 256)
		     (cdr (car (char-table-extra-slot font-spec-table 0))))
		(and font-spec
		     (encode-char char (ps-mule-font-spec-charset font-spec))
		     font-spec)
		(catch 'tag
		  (dolist (elt (char-table-extra-slot font-spec-table 0))
		    (and (encode-char char (car elt))
			 (throw 'tag (cdr elt)))))
		;; Record that no font-spec exist for CHAR.
		t))))