Function: ps-mule-generate-bitmap-glyph
ps-mule-generate-bitmap-glyph is a byte-compiled function defined in
ps-mule.el.gz.
Signature
(ps-mule-generate-bitmap-glyph FONT-SPEC CHAR CODE BITMAP)
Source Code
;; Defined in /usr/src/emacs/lisp/ps-mule.el.gz
(defun ps-mule-generate-bitmap-glyph (font-spec char code bitmap)
(let* ((id (ps-mule-font-spec-id font-spec))
;; FONT-RECORD ::= ([(SUBFONT-OUTPUT-LIST ...) | t]
;; BASEFONT-OUTPUT-LIST SIZE REL-COMP B-OFFSET BBX)
(font-record (aref ps-mule-bitmap-font-record id))
enc-name
output-list)
(if (listp (aref font-record 0))
;; This is a 2-dimensional font. Create a subfont for this
;; glyph if not yet created.
(let* ((high (/ code 256))
(id2 (+ (* id 256) high)))
(setq output-list (cdr (assq high (aref font-record 0)))
code (% code 256))
(or output-list
;; We must create a subfont.
(let ((enc-list (car (aref font-record 1)))
(fdep-list (nth 1 (aref font-record 1))))
(setq output-list
(list
(format "/E%04X [ 0 1 255 {pop /.notdef} for ] def\n"
id2)
(format "/F%04X %f %S %d E%04X NBF\n"
id2 (aref font-record 2) (aref font-record 3)
(aref font-record 4) id2)
(format "E%02X %d %d put\n"
id high (1- (length fdep-list)))))
(nconc enc-list (list output-list))
(nconc fdep-list (list (format " F%04X" id2)))
(aset font-record 0
(cons (cons high output-list) (aref font-record 0)))))
(setq enc-name (format "%04X" id2)))
(setq output-list (aref font-record 1)
enc-name (format "%02X" id)))
(setcdr ps-mule-bitmap-dict-list
(cons (format "/C%02X-%X %s\n" id char bitmap)
(cdr ps-mule-bitmap-dict-list)))
(setcdr output-list
(cons (format "E%s %d /C%02X-%X put\n" enc-name code id char)
(cdr output-list))))
nil)