(defconst kTextEncodingISOLatin2 514 "0x202")
-(define-ccl-program ccl-encode-mac-roman-font
- `(0
- (if (r0 != ,(charset-id 'ascii))
- (if (r0 == ,(charset-id 'latin-iso8859-1))
- (translate-character mac-roman-encoder r0 r1)
- ((r1 <<= 7)
- (r1 |= r2)
- (translate-character mac-roman-encoder r0 r1)))))
- "CCL program for Mac Roman font")
-
-(setq font-ccl-encoder-alist
- (cons '("mac-roman" . ccl-encode-mac-roman-font)
- font-ccl-encoder-alist))
-
;; Create a fontset that uses mac-roman font. With this fontset,
;; characters decoded from mac-roman encoding (ascii, latin-iso8859-1,
;; and mule-unicode-xxxx-yyyy) are displayed by a mac-roman font.
(if (fboundp 'new-fontset)
- (progn
- (create-fontset-from-fontset-spec
- "-etl-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-mac,
-ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
- (let ((monaco-font '("monaco" . "mac-roman")))
- (map-char-table
- (function
- (lambda (key val)
- (or (generic-char-p key)
- (memq (char-charset key)
- '(ascii eight-bit-control eight-bit-graphic))
- (set-fontset-font "fontset-mac" key monaco-font))))
- (get 'mac-roman-encoder 'translation-table)))))
+ (create-fontset-from-fontset-spec
+ "-etl-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-mac,
+ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman
+mac-roman:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman"))
;; To display filenames in Chinese or Japanese, replace mac-roman with
;; big5 or sjis