Function: artist-figlet-run

artist-figlet-run is a byte-compiled function defined in artist.el.gz.

Signature

(artist-figlet-run TEXT FONT EXTRA-ARGS)

Documentation

Run figlet rendering TEXT using FONT.

EXTRA-ARGS for figlet, for the command line, may be specified.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
;;
;; Text rendering
;;
(defun artist-figlet-run (text font extra-args)
  "Run figlet rendering TEXT using FONT.
EXTRA-ARGS for figlet, for the command line, may be specified."
  (let* ((figlet-args (cond ((and font extra-args)
			     (cons (concat "-f" font)
				   (artist-string-split extra-args "[ \t]+")))
			    (font (concat "-f" font))
			    (extra-args
			     (artist-string-split extra-args "[ \t]+"))
			    (t nil)))
	 (figlet-output (artist-system artist-figlet-program text figlet-args))
	 (exit-code (elt figlet-output 0))
	 (stdout    (elt figlet-output 1))
	 (stderr    (elt figlet-output 2)))
    (if (not (= exit-code 0))
	(error "Failed to render font: %s (%d)" stderr exit-code))
    stdout))