diff options
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/mac-win.el | 423 | ||||
-rw-r--r-- | lisp/term/w32-win.el | 8 | ||||
-rw-r--r-- | lisp/term/x-win.el | 355 |
3 files changed, 183 insertions, 603 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index a7ded41103e..88350151613 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1078,422 +1078,23 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") ;; Exit Emacs with fatal error if this fails. t)) -(setq frame-creation-function 'x-create-frame-with-faces) - -(define-ccl-program ccl-encode-mac-roman-font - `(0 - (if (r0 != ,(charset-id 'ascii)) - (if (r0 <= ?\x8f) - (translate-character mac-roman-encoder r0 r1) - ((r1 <<= 7) - (r1 |= r2) - (translate-character mac-roman-encoder r0 r1))))) - "CCL program for Mac Roman font") - -(let - ((encoding-vector (make-vector 256 nil)) - (i 0) - (vec ;; mac-centraleurroman (128..255) -> UCS mapping - [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS - #x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON - #x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON - #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE - #x0104 ;; 132:LATIN CAPITAL LETTER A WITH OGONEK - #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS - #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS - #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE - #x0105 ;; 136:LATIN SMALL LETTER A WITH OGONEK - #x010C ;; 137:LATIN CAPITAL LETTER C WITH CARON - #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS - #x010D ;; 139:LATIN SMALL LETTER C WITH CARON - #x0106 ;; 140:LATIN CAPITAL LETTER C WITH ACUTE - #x0107 ;; 141:LATIN SMALL LETTER C WITH ACUTE - #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE - #x0179 ;; 143:LATIN CAPITAL LETTER Z WITH ACUTE - #x017A ;; 144:LATIN SMALL LETTER Z WITH ACUTE - #x010E ;; 145:LATIN CAPITAL LETTER D WITH CARON - #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE - #x010F ;; 147:LATIN SMALL LETTER D WITH CARON - #x0112 ;; 148:LATIN CAPITAL LETTER E WITH MACRON - #x0113 ;; 149:LATIN SMALL LETTER E WITH MACRON - #x0116 ;; 150:LATIN CAPITAL LETTER E WITH DOT ABOVE - #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE - #x0117 ;; 152:LATIN SMALL LETTER E WITH DOT ABOVE - #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX - #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS - #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE - #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE - #x011A ;; 157:LATIN CAPITAL LETTER E WITH CARON - #x011B ;; 158:LATIN SMALL LETTER E WITH CARON - #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS - #x2020 ;; 160:DAGGER - #x00B0 ;; 161:DEGREE SIGN - #x0118 ;; 162:LATIN CAPITAL LETTER E WITH OGONEK - #x00A3 ;; 163:POUND SIGN - #x00A7 ;; 164:SECTION SIGN - #x2022 ;; 165:BULLET - #x00B6 ;; 166:PILCROW SIGN - #x00DF ;; 167:LATIN SMALL LETTER SHARP S - #x00AE ;; 168:REGISTERED SIGN - #x00A9 ;; 169:COPYRIGHT SIGN - #x2122 ;; 170:TRADE MARK SIGN - #x0119 ;; 171:LATIN SMALL LETTER E WITH OGONEK - #x00A8 ;; 172:DIAERESIS - #x2260 ;; 173:NOT EQUAL TO - #x0123 ;; 174:LATIN SMALL LETTER G WITH CEDILLA - #x012E ;; 175:LATIN CAPITAL LETTER I WITH OGONEK - #x012F ;; 176:LATIN SMALL LETTER I WITH OGONEK - #x012A ;; 177:LATIN CAPITAL LETTER I WITH MACRON - #x2264 ;; 178:LESS-THAN OR EQUAL TO - #x2265 ;; 179:GREATER-THAN OR EQUAL TO - #x012B ;; 180:LATIN SMALL LETTER I WITH MACRON - #x0136 ;; 181:LATIN CAPITAL LETTER K WITH CEDILLA - #x2202 ;; 182:PARTIAL DIFFERENTIAL - #x2211 ;; 183:N-ARY SUMMATION - #x0142 ;; 184:LATIN SMALL LETTER L WITH STROKE - #x013B ;; 185:LATIN CAPITAL LETTER L WITH CEDILLA - #x013C ;; 186:LATIN SMALL LETTER L WITH CEDILLA - #x013D ;; 187:LATIN CAPITAL LETTER L WITH CARON - #x013E ;; 188:LATIN SMALL LETTER L WITH CARON - #x0139 ;; 189:LATIN CAPITAL LETTER L WITH ACUTE - #x013A ;; 190:LATIN SMALL LETTER L WITH ACUTE - #x0145 ;; 191:LATIN CAPITAL LETTER N WITH CEDILLA - #x0146 ;; 192:LATIN SMALL LETTER N WITH CEDILLA - #x0143 ;; 193:LATIN CAPITAL LETTER N WITH ACUTE - #x00AC ;; 194:NOT SIGN - #x221A ;; 195:SQUARE ROOT - #x0144 ;; 196:LATIN SMALL LETTER N WITH ACUTE - #x0147 ;; 197:LATIN CAPITAL LETTER N WITH CARON - #x2206 ;; 198:INCREMENT - #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - #x2026 ;; 201:HORIZONTAL ELLIPSIS - #x00A0 ;; 202:NO-BREAK SPACE - #x0148 ;; 203:LATIN SMALL LETTER N WITH CARON - #x0150 ;; 204:LATIN CAPITAL LETTER O WITH DOUBLE ACUTE - #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE - #x0151 ;; 206:LATIN SMALL LETTER O WITH DOUBLE ACUTE - #x014C ;; 207:LATIN CAPITAL LETTER O WITH MACRON - #x2013 ;; 208:EN DASH - #x2014 ;; 209:EM DASH - #x201C ;; 210:LEFT DOUBLE QUOTATION MARK - #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK - #x2018 ;; 212:LEFT SINGLE QUOTATION MARK - #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK - #x00F7 ;; 214:DIVISION SIGN - #x25CA ;; 215:LOZENGE - #x014D ;; 216:LATIN SMALL LETTER O WITH MACRON - #x0154 ;; 217:LATIN CAPITAL LETTER R WITH ACUTE - #x0155 ;; 218:LATIN SMALL LETTER R WITH ACUTE - #x0158 ;; 219:LATIN CAPITAL LETTER R WITH CARON - #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK - #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - #x0159 ;; 222:LATIN SMALL LETTER R WITH CARON - #x0156 ;; 223:LATIN CAPITAL LETTER R WITH CEDILLA - #x0157 ;; 224:LATIN SMALL LETTER R WITH CEDILLA - #x0160 ;; 225:LATIN CAPITAL LETTER S WITH CARON - #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK - #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK - #x0161 ;; 228:LATIN SMALL LETTER S WITH CARON - #x015A ;; 229:LATIN CAPITAL LETTER S WITH ACUTE - #x015B ;; 230:LATIN SMALL LETTER S WITH ACUTE - #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE - #x0164 ;; 232:LATIN CAPITAL LETTER T WITH CARON - #x0165 ;; 233:LATIN SMALL LETTER T WITH CARON - #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE - #x017D ;; 235:LATIN CAPITAL LETTER Z WITH CARON - #x017E ;; 236:LATIN SMALL LETTER Z WITH CARON - #x016A ;; 237:LATIN CAPITAL LETTER U WITH MACRON - #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE - #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX - #x016B ;; 240:LATIN SMALL LETTER U WITH MACRON - #x016E ;; 241:LATIN CAPITAL LETTER U WITH RING ABOVE - #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE - #x016F ;; 243:LATIN SMALL LETTER U WITH RING ABOVE - #x0170 ;; 244:LATIN CAPITAL LETTER U WITH DOUBLE ACUTE - #x0171 ;; 245:LATIN SMALL LETTER U WITH DOUBLE ACUTE - #x0172 ;; 246:LATIN CAPITAL LETTER U WITH OGONEK - #x0173 ;; 247:LATIN SMALL LETTER U WITH OGONEK - #x00DD ;; 248:LATIN CAPITAL LETTER Y WITH ACUTE - #x00FD ;; 249:LATIN SMALL LETTER Y WITH ACUTE - #x0137 ;; 250:LATIN SMALL LETTER K WITH CEDILLA - #x017B ;; 251:LATIN CAPITAL LETTER Z WITH DOT ABOVE - #x0141 ;; 252:LATIN CAPITAL LETTER L WITH STROKE - #x017C ;; 253:LATIN SMALL LETTER Z WITH DOT ABOVE - #x0122 ;; 254:LATIN CAPITAL LETTER G WITH CEDILLA - #x02C7 ;; 255:CARON - ]) - translation-table) - (while (< i 128) - (aset encoding-vector i i) - (setq i (1+ i))) - (while (< i 256) - (aset encoding-vector i - (decode-char 'ucs (aref vec (- i 128)))) - (setq i (1+ i))) - (setq translation-table - (make-translation-table-from-vector encoding-vector)) -;; (define-translation-table 'mac-centraleurroman-decoder translation-table) - (define-translation-table 'mac-centraleurroman-encoder - (char-table-extra-slot translation-table 0))) - -(let - ((encoding-vector (make-vector 256 nil)) - (i 0) - (vec ;; mac-cyrillic (128..255) -> UCS mapping - [ #x0410 ;; 128:CYRILLIC CAPITAL LETTER A - #x0411 ;; 129:CYRILLIC CAPITAL LETTER BE - #x0412 ;; 130:CYRILLIC CAPITAL LETTER VE - #x0413 ;; 131:CYRILLIC CAPITAL LETTER GHE - #x0414 ;; 132:CYRILLIC CAPITAL LETTER DE - #x0415 ;; 133:CYRILLIC CAPITAL LETTER IE - #x0416 ;; 134:CYRILLIC CAPITAL LETTER ZHE - #x0417 ;; 135:CYRILLIC CAPITAL LETTER ZE - #x0418 ;; 136:CYRILLIC CAPITAL LETTER I - #x0419 ;; 137:CYRILLIC CAPITAL LETTER SHORT I - #x041A ;; 138:CYRILLIC CAPITAL LETTER KA - #x041B ;; 139:CYRILLIC CAPITAL LETTER EL - #x041C ;; 140:CYRILLIC CAPITAL LETTER EM - #x041D ;; 141:CYRILLIC CAPITAL LETTER EN - #x041E ;; 142:CYRILLIC CAPITAL LETTER O - #x041F ;; 143:CYRILLIC CAPITAL LETTER PE - #x0420 ;; 144:CYRILLIC CAPITAL LETTER ER - #x0421 ;; 145:CYRILLIC CAPITAL LETTER ES - #x0422 ;; 146:CYRILLIC CAPITAL LETTER TE - #x0423 ;; 147:CYRILLIC CAPITAL LETTER U - #x0424 ;; 148:CYRILLIC CAPITAL LETTER EF - #x0425 ;; 149:CYRILLIC CAPITAL LETTER HA - #x0426 ;; 150:CYRILLIC CAPITAL LETTER TSE - #x0427 ;; 151:CYRILLIC CAPITAL LETTER CHE - #x0428 ;; 152:CYRILLIC CAPITAL LETTER SHA - #x0429 ;; 153:CYRILLIC CAPITAL LETTER SHCHA - #x042A ;; 154:CYRILLIC CAPITAL LETTER HARD SIGN - #x042B ;; 155:CYRILLIC CAPITAL LETTER YERU - #x042C ;; 156:CYRILLIC CAPITAL LETTER SOFT SIGN - #x042D ;; 157:CYRILLIC CAPITAL LETTER E - #x042E ;; 158:CYRILLIC CAPITAL LETTER YU - #x042F ;; 159:CYRILLIC CAPITAL LETTER YA - #x2020 ;; 160:DAGGER - #x00B0 ;; 161:DEGREE SIGN - #x0490 ;; 162:CYRILLIC CAPITAL LETTER GHE WITH UPTURN - #x00A3 ;; 163:POUND SIGN - #x00A7 ;; 164:SECTION SIGN - #x2022 ;; 165:BULLET - #x00B6 ;; 166:PILCROW SIGN - #x0406 ;; 167:CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I - #x00AE ;; 168:REGISTERED SIGN - #x00A9 ;; 169:COPYRIGHT SIGN - #x2122 ;; 170:TRADE MARK SIGN - #x0402 ;; 171:CYRILLIC CAPITAL LETTER DJE - #x0452 ;; 172:CYRILLIC SMALL LETTER DJE - #x2260 ;; 173:NOT EQUAL TO - #x0403 ;; 174:CYRILLIC CAPITAL LETTER GJE - #x0453 ;; 175:CYRILLIC SMALL LETTER GJE - #x221E ;; 176:INFINITY - #x00B1 ;; 177:PLUS-MINUS SIGN - #x2264 ;; 178:LESS-THAN OR EQUAL TO - #x2265 ;; 179:GREATER-THAN OR EQUAL TO - #x0456 ;; 180:CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I - #x00B5 ;; 181:MICRO SIGN - #x0491 ;; 182:CYRILLIC SMALL LETTER GHE WITH UPTURN - #x0408 ;; 183:CYRILLIC CAPITAL LETTER JE - #x0404 ;; 184:CYRILLIC CAPITAL LETTER UKRAINIAN IE - #x0454 ;; 185:CYRILLIC SMALL LETTER UKRAINIAN IE - #x0407 ;; 186:CYRILLIC CAPITAL LETTER YI - #x0457 ;; 187:CYRILLIC SMALL LETTER YI - #x0409 ;; 188:CYRILLIC CAPITAL LETTER LJE - #x0459 ;; 189:CYRILLIC SMALL LETTER LJE - #x040A ;; 190:CYRILLIC CAPITAL LETTER NJE - #x045A ;; 191:CYRILLIC SMALL LETTER NJE - #x0458 ;; 192:CYRILLIC SMALL LETTER JE - #x0405 ;; 193:CYRILLIC CAPITAL LETTER DZE - #x00AC ;; 194:NOT SIGN - #x221A ;; 195:SQUARE ROOT - #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK - #x2248 ;; 197:ALMOST EQUAL TO - #x2206 ;; 198:INCREMENT - #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - #x2026 ;; 201:HORIZONTAL ELLIPSIS - #x00A0 ;; 202:NO-BREAK SPACE - #x040B ;; 203:CYRILLIC CAPITAL LETTER TSHE - #x045B ;; 204:CYRILLIC SMALL LETTER TSHE - #x040C ;; 205:CYRILLIC CAPITAL LETTER KJE - #x045C ;; 206:CYRILLIC SMALL LETTER KJE - #x0455 ;; 207:CYRILLIC SMALL LETTER DZE - #x2013 ;; 208:EN DASH - #x2014 ;; 209:EM DASH - #x201C ;; 210:LEFT DOUBLE QUOTATION MARK - #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK - #x2018 ;; 212:LEFT SINGLE QUOTATION MARK - #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK - #x00F7 ;; 214:DIVISION SIGN - #x201E ;; 215:DOUBLE LOW-9 QUOTATION MARK - #x040E ;; 216:CYRILLIC CAPITAL LETTER SHORT U - #x045E ;; 217:CYRILLIC SMALL LETTER SHORT U - #x040F ;; 218:CYRILLIC CAPITAL LETTER DZHE - #x045F ;; 219:CYRILLIC SMALL LETTER DZHE - #x2116 ;; 220:NUMERO SIGN - #x0401 ;; 221:CYRILLIC CAPITAL LETTER IO - #x0451 ;; 222:CYRILLIC SMALL LETTER IO - #x044F ;; 223:CYRILLIC SMALL LETTER YA - #x0430 ;; 224:CYRILLIC SMALL LETTER A - #x0431 ;; 225:CYRILLIC SMALL LETTER BE - #x0432 ;; 226:CYRILLIC SMALL LETTER VE - #x0433 ;; 227:CYRILLIC SMALL LETTER GHE - #x0434 ;; 228:CYRILLIC SMALL LETTER DE - #x0435 ;; 229:CYRILLIC SMALL LETTER IE - #x0436 ;; 230:CYRILLIC SMALL LETTER ZHE - #x0437 ;; 231:CYRILLIC SMALL LETTER ZE - #x0438 ;; 232:CYRILLIC SMALL LETTER I - #x0439 ;; 233:CYRILLIC SMALL LETTER SHORT I - #x043A ;; 234:CYRILLIC SMALL LETTER KA - #x043B ;; 235:CYRILLIC SMALL LETTER EL - #x043C ;; 236:CYRILLIC SMALL LETTER EM - #x043D ;; 237:CYRILLIC SMALL LETTER EN - #x043E ;; 238:CYRILLIC SMALL LETTER O - #x043F ;; 239:CYRILLIC SMALL LETTER PE - #x0440 ;; 240:CYRILLIC SMALL LETTER ER - #x0441 ;; 241:CYRILLIC SMALL LETTER ES - #x0442 ;; 242:CYRILLIC SMALL LETTER TE - #x0443 ;; 243:CYRILLIC SMALL LETTER U - #x0444 ;; 244:CYRILLIC SMALL LETTER EF - #x0445 ;; 245:CYRILLIC SMALL LETTER HA - #x0446 ;; 246:CYRILLIC SMALL LETTER TSE - #x0447 ;; 247:CYRILLIC SMALL LETTER CHE - #x0448 ;; 248:CYRILLIC SMALL LETTER SHA - #x0449 ;; 249:CYRILLIC SMALL LETTER SHCHA - #x044A ;; 250:CYRILLIC SMALL LETTER HARD SIGN - #x044B ;; 251:CYRILLIC SMALL LETTER YERU - #x044C ;; 252:CYRILLIC SMALL LETTER SOFT SIGN - #x044D ;; 253:CYRILLIC SMALL LETTER E - #x044E ;; 254:CYRILLIC SMALL LETTER YU - #x20AC ;; 255:EURO SIGN - ]) - translation-table) - (while (< i 128) - (aset encoding-vector i i) - (setq i (1+ i))) - (while (< i 256) - (aset encoding-vector i - (decode-char 'ucs (aref vec (- i 128)))) - (setq i (1+ i))) - (setq translation-table - (make-translation-table-from-vector encoding-vector)) -;; (define-translation-table 'mac-cyrillic-decoder translation-table) - (define-translation-table 'mac-cyrillic-encoder - (char-table-extra-slot translation-table 0))) - -(defvar mac-font-encoder-list - '(("mac-roman" mac-roman-encoder - ccl-encode-mac-roman-font "%s") - ("mac-centraleurroman" mac-centraleurroman-encoder - ccl-encode-mac-centraleurroman-font "%s ce") - ("mac-cyrillic" mac-cyrillic-encoder - ccl-encode-mac-cyrillic-font "%s cy"))) - -(let ((encoder-list - (mapcar (lambda (lst) (nth 1 lst)) mac-font-encoder-list)) - (charset-list - '(latin-iso8859-2 - latin-iso8859-3 latin-iso8859-4 - cyrillic-iso8859-5 greek-iso8859-7 hebrew-iso8859-8 - latin-iso8859-9 latin-iso8859-14 latin-iso8859-15))) - (dolist (encoder encoder-list) - (let ((table (get encoder 'translation-table))) - (dolist (charset charset-list) - (dotimes (i 96) - (let* ((c (make-char charset (+ i 32))) - (mu (aref ucs-mule-to-mule-unicode c)) - (mac-encoded (and mu (aref table mu)))) - (if mac-encoded - (aset table c mac-encoded)))))))) - -(define-ccl-program ccl-encode-mac-centraleurroman-font - `(0 - (if (r0 != ,(charset-id 'ascii)) - (if (r0 <= ?\x8f) - (translate-character mac-centraleurroman-encoder r0 r1) - ((r1 <<= 7) - (r1 |= r2) - (translate-character mac-centraleurroman-encoder r0 r1))))) - "CCL program for Mac Central European Roman font") - -(define-ccl-program ccl-encode-mac-cyrillic-font - `(0 - (if (r0 != ,(charset-id 'ascii)) - (if (r0 <= ?\x8f) - (translate-character mac-cyrillic-encoder r0 r1) - ((r1 <<= 7) - (r1 |= r2) - (translate-character mac-cyrillic-encoder r0 r1))))) - "CCL program for Mac Cyrillic font") - - -(setq font-ccl-encoder-alist - (nconc - (mapcar (lambda (lst) (cons (nth 0 lst) (nth 2 lst))) - mac-font-encoder-list) - font-ccl-encoder-alist)) - -(defun fontset-add-mac-fonts (fontset &optional base-family) - (if base-family - (setq base-family (downcase base-family)) - (let ((ascii-font - (downcase (x-resolve-font-name - (fontset-font fontset (charset-id 'ascii)))))) - (setq base-family (aref (x-decompose-font-name ascii-font) - xlfd-regexp-family-subnum)))) -;; (if (not (string-match "^fontset-" fontset)) -;; (setq fontset -;; (concat "fontset-" (aref (x-decompose-font-name fontset) -;; xlfd-regexp-encoding-subnum)))) - (dolist - (font-encoder - (nreverse - (mapcar (lambda (lst) - (cons (cons (format (nth 3 lst) base-family) (nth 0 lst)) - (nth 1 lst))) - mac-font-encoder-list))) - (let ((font (car font-encoder)) - (encoder (cdr font-encoder))) - (map-char-table - (lambda (key val) - (or (null val) - (generic-char-p key) - (memq (char-charset key) - '(ascii eight-bit-control eight-bit-graphic)) - (set-fontset-font fontset key font))) - (get encoder 'translation-table))))) - -(defun create-fontset-from-mac-roman-font (font &optional resolved-font - fontset-name) - "Create a fontset from a Mac roman font FONT. - -Optional 1st arg RESOLVED-FONT is a resolved name of FONT. If -omitted, `x-resolve-font-name' is called to get the resolved name. At -this time, if FONT is not available, error is signaled. - -Optional 2nd arg FONTSET-NAME is a string to be used in -`<CHARSET_ENCODING>' fields of a new fontset name. If it is omitted, -an appropriate name is generated automatically. - -It returns a name of the created fontset." - (let ((fontset - (create-fontset-from-ascii-font font resolved-font fontset-name))) - (fontset-add-mac-fonts fontset) - fontset)) - -;; Setup the default fontset. +(setq frame-creation-function 'x-create-frame-with-faces);; Setup the default fontset. (setup-default-fontset) +;; Carbon uses different fonts than commonly found on X, so +;; we define our own standard fontset here. +(defvar mac-standard-fontset-spec + "-apple-Monaco-normal-r-*-*-12-*-*-*-*-*-fontset-mac" + "String of fontset spec of the standard fontset. +This defines a fontset consisting of the Monaco variations for +European languages which are distributed with Mac OS X. + +See the documentation of `create-fontset-from-fontset-spec for the format.") + ;; 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. -(create-fontset-from-fontset-spec - "-etl-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-mac, -ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman") -(fontset-add-mac-fonts "fontset-mac") +(create-fontset-from-fontset-spec mac-standard-fontset-spec t) ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). (create-fontset-from-x-resource) diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index cea1d3f77b8..b2f2269c558 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -1227,10 +1227,10 @@ See the documentation of `create-fontset-from-fontset-spec for the format.") (list face (if (equal value "") nil value)))) ;;; Enable Japanese fonts on Windows to be used by default. -(set-fontset-font nil (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS")) -(set-fontset-font nil (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS")) -(set-fontset-font nil (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS")) -(set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS")) +;; (set-fontset-font nil (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS")) +;; (set-fontset-font nil (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS")) +;; (set-fontset-font nil (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS")) +;; (set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS")) (defun mouse-set-font (&rest fonts) "Select a font. diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 17ec969e45b..8b345291fa8 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1260,9 +1260,10 @@ as returned by `x-server-vendor'." ;; This is used by DEC's X server. '((65280 . remove))))) +;; Latin-1 (let ((i 160)) (while (< i 256) - (puthash i (make-char 'latin-iso8859-1 i) x-keysym-table) + (puthash i i x-keysym-table) (setq i (1+ i)))) ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding' @@ -1390,70 +1391,70 @@ as returned by `x-server-vendor'." ;; Kana: Fixme: needs conversion to Japanese charset -- seems ;; to require jisx0213, for which the Unicode translation ;; isn't clear. - (#x47e . ?$,1s>(B) - (#x4a1 . ?$,2=B(B) - (#x4a2 . ?\$,2=L(B) - (#x4a3 . ?\$,2=M(B) - (#x4a4 . ?$,2=A(B) - (#x4a5 . ?$,2?{(B) - (#x4a6 . ?$,2?r(B) - (#x4a7 . ?$,2?!(B) - (#x4a8 . ?$,2?#(B) - (#x4a9 . ?$,2?%(B) - (#x4aa . ?$,2?'(B) - (#x4ab . ?$,2?)(B) - (#x4ac . ?$,2?c(B) - (#x4ad . ?$,2?e(B) - (#x4ae . ?$,2?g(B) - (#x4af . ?$,2?C(B) - (#x4b0 . ?$,2?|(B) - (#x4b1 . ?$,2?"(B) - (#x4b2 . ?$,2?$(B) - (#x4b3 . ?$,2?&(B) - (#x4b4 . ?$,2?((B) - (#x4b5 . ?$,2?*(B) - (#x4b6 . ?$,2?+(B) - (#x4b7 . ?$,2?-(B) - (#x4b8 . ?$,2?/(B) - (#x4b9 . ?$,2?1(B) - (#x4ba . ?$,2?3(B) - (#x4bb . ?$,2?5(B) - (#x4bc . ?$,2?7(B) - (#x4bd . ?$,2?9(B) - (#x4be . ?$,2?;(B) - (#x4bf . ?$,2?=(B) - (#x4c0 . ?$,2??(B) - (#x4c1 . ?$,2?A(B) - (#x4c2 . ?$,2?D(B) - (#x4c3 . ?$,2?F(B) - (#x4c4 . ?$,2?H(B) - (#x4c5 . ?$,2?J(B) - (#x4c6 . ?$,2?K(B) - (#x4c7 . ?$,2?L(B) - (#x4c8 . ?$,2?M(B) - (#x4c9 . ?$,2?N(B) - (#x4ca . ?$,2?O(B) - (#x4cb . ?$,2?R(B) - (#x4cc . ?$,2?U(B) - (#x4cd . ?$,2?X(B) - (#x4ce . ?$,2?[(B) - (#x4cf . ?$,2?^(B) - (#x4d0 . ?$,2?_(B) - (#x4d1 . ?$,2?`(B) - (#x4d2 . ?$,2?a(B) - (#x4d3 . ?$,2?b(B) - (#x4d4 . ?$,2?d(B) - (#x4d5 . ?$,2?f(B) - (#x4d6 . ?$,2?h(B) - (#x4d7 . ?$,2?i(B) - (#x4d8 . ?$,2?j(B) - (#x4d9 . ?$,2?k(B) - (#x4da . ?$,2?l(B) - (#x4db . ?$,2?m(B) - (#x4dc . ?$,2?o(B) - (#x4dd . ?$,2?s(B) - (#x4de . ?$,2>{(B) - (#x4df . ?$,2>|(B) + (#x47e . ?(J~(B) + (#x4a1 . ?$A!#(B) + (#x4a2 . ?\$A!8(B) + (#x4a3 . ?\$A!9(B) + (#x4a4 . ?$A!"(B) + (#x4a5 . ?$A!$(B) + (#x4a6 . ?$A%r(B) + (#x4a7 . ?$A%!(B) + (#x4a8 . ?$A%#(B) + (#x4a9 . ?$A%%(B) + (#x4aa . ?$A%'(B) + (#x4ab . ?$A%)(B) + (#x4ac . ?$A%c(B) + (#x4ad . ?$A%e(B) + (#x4ae . ?$A%g(B) + (#x4af . ?$A%C(B) + (#x4b0 . ?$B!<(B) + (#x4b1 . ?$A%"(B) + (#x4b2 . ?$A%$(B) + (#x4b3 . ?$A%&(B) + (#x4b4 . ?$A%((B) + (#x4b5 . ?$A%*(B) + (#x4b6 . ?$A%+(B) + (#x4b7 . ?$A%-(B) + (#x4b8 . ?$A%/(B) + (#x4b9 . ?$A%1(B) + (#x4ba . ?$A%3(B) + (#x4bb . ?$A%5(B) + (#x4bc . ?$A%7(B) + (#x4bd . ?$A%9(B) + (#x4be . ?$A%;(B) + (#x4bf . ?$A%=(B) + (#x4c0 . ?$A%?(B) + (#x4c1 . ?$A%A(B) + (#x4c2 . ?$A%D(B) + (#x4c3 . ?$A%F(B) + (#x4c4 . ?$A%H(B) + (#x4c5 . ?$A%J(B) + (#x4c6 . ?$A%K(B) + (#x4c7 . ?$A%L(B) + (#x4c8 . ?$A%M(B) + (#x4c9 . ?$A%N(B) + (#x4ca . ?$A%O(B) + (#x4cb . ?$A%R(B) + (#x4cc . ?$A%U(B) + (#x4cd . ?$A%X(B) + (#x4ce . ?$A%[(B) + (#x4cf . ?$A%^(B) + (#x4d0 . ?$A%_(B) + (#x4d1 . ?$A%`(B) + (#x4d2 . ?$A%a(B) + (#x4d3 . ?$A%b(B) + (#x4d4 . ?$A%d(B) + (#x4d5 . ?$A%f(B) + (#x4d6 . ?$A%h(B) + (#x4d7 . ?$A%i(B) + (#x4d8 . ?$A%j(B) + (#x4d9 . ?$A%k(B) + (#x4da . ?$A%l(B) + (#x4db . ?$A%m(B) + (#x4dc . ?$A%o(B) + (#x4dd . ?$A%s(B) + (#x4de . ?$B!+(B) + (#x4df . ?$B!,(B) ;; Arabic (#x5ac . ?,G,(B) (#x5bb . ?,G;(B) @@ -1671,11 +1672,11 @@ as returned by `x-server-vendor'." (#x7f9 . ?,Fy(B) ;; Technical (#x8a1 . ?$,1|W(B) - (#x8a2 . ?$,2 ,(B) - (#x8a3 . ?$,2 (B) + (#x8a2 . ?$A)0(B) + (#x8a3 . ?$A)$(B) (#x8a4 . ?$,1{ (B) (#x8a5 . ?$,1{!(B) - (#x8a6 . ?$,2 "(B) + (#x8a6 . ?$A)&(B) (#x8a7 . ?$,1|A(B) (#x8a8 . ?$,1|C(B) (#x8a9 . ?$,1|D(B) @@ -1686,56 +1687,56 @@ as returned by `x-server-vendor'." (#x8ae . ?$,1|@(B) (#x8af . ?$,1|H(B) (#x8b0 . ?$,1|L(B) - (#x8bc . ?$,1y$(B) - (#x8bd . ?$,1y (B) - (#x8be . ?$,1y%(B) - (#x8bf . ?$,1xK(B) - (#x8c0 . ?$,1xT(B) - (#x8c1 . ?$,1x=(B) - (#x8c2 . ?$,1x>(B) - (#x8c5 . ?$,1x'(B) - (#x8c8 . ?$,1x\(B) - (#x8c9 . ?$,1xc(B) - (#x8cd . ?$,1wT(B) - (#x8ce . ?$,1wR(B) - (#x8cf . ?$,1y!(B) - (#x8d6 . ?$,1x:(B) - (#x8da . ?$,1yB(B) - (#x8db . ?$,1yC(B) - (#x8dc . ?$,1xI(B) - (#x8dd . ?$,1xJ(B) - (#x8de . ?$,1xG(B) - (#x8df . ?$,1xH(B) - (#x8ef . ?$,1x"(B) + (#x8bc . ?$A!\(B) + (#x8bd . ?$A!Y(B) + (#x8be . ?$A!](B) + (#x8bf . ?$A!R(B) + (#x8c0 . ?$A!`(B) + (#x8c1 . ?$A!X(B) + (#x8c2 . ?$A!^(B) + (#x8c5 . ?$B"`(B) + (#x8c8 . ?$(G"D(B) + (#x8c9 . ?$(O"l(B) + (#x8cd . ?$B"N(B) + (#x8ce . ?$B"M(B) + (#x8cf . ?$A!T(B) + (#x8d6 . ?$A!L(B) + (#x8da . ?$B">(B) + (#x8db . ?$B"?(B) + (#x8dc . ?$A!I(B) + (#x8dd . ?$A!H(B) + (#x8de . ?$A!D(B) + (#x8df . ?$A!E(B) + (#x8ef . ?$B"_(B) (#x8f6 . ?$,1!R(B) - (#x8fb . ?$,1vp(B) - (#x8fc . ?$,1vq(B) - (#x8fd . ?$,1vr(B) - (#x8fe . ?$,1vs(B) + (#x8fb . ?$A!{(B) + (#x8fc . ?$A!|(B) + (#x8fd . ?$A!z(B) + (#x8fe . ?$A!}(B) ;; Special - (#x9e0 . ?$,2"&(B) - (#x9e1 . ?$,2!R(B) - (#x9e2 . ?$,1}I(B) - (#x9e3 . ?$,1}L(B) - (#x9e4 . ?$,1}M(B) - (#x9e5 . ?$,1}J(B) + (#x9e0 . ?$A!t(B) + (#x9e1 . ?$(C"F(B) + (#x9e2 . ?$(GB*(B) + (#x9e3 . ?$(GB-(B) + (#x9e4 . ?$(GB.(B) + (#x9e5 . ?$(GB+(B) (#x9e8 . ?$,1}d(B) - (#x9e9 . ?$,1}K(B) - (#x9ea . ?$,2 8(B) - (#x9eb . ?$,2 0(B) - (#x9ec . ?$,2 ,(B) - (#x9ed . ?$,2 4(B) - (#x9ee . ?$,2 \(B) + (#x9e9 . ?$(GB,(B) + (#x9ea . ?$A)<(B) + (#x9eb . ?$A)4(B) + (#x9ec . ?$A)0(B) + (#x9ed . ?$A)8(B) + (#x9ee . ?$A)`(B) (#x9ef . ?$,1|Z(B) (#x9f0 . ?$,1|[(B) - (#x9f1 . ?$,2 (B) + (#x9f1 . ?$A)$(B) (#x9f2 . ?$,1|\(B) (#x9f3 . ?$,1|](B) - (#x9f4 . ?$,2 <(B) - (#x9f5 . ?$,2 D(B) - (#x9f6 . ?$,2 T(B) - (#x9f7 . ?$,2 L(B) - (#x9f8 . ?$,2 "(B) + (#x9f4 . ?$A)@(B) + (#x9f5 . ?$A)H(B) + (#x9f6 . ?$A)X(B) + (#x9f7 . ?$A)P(B) + (#x9f8 . ?$A)&(B) ;; Publishing (#xaa1 . ?$,1rc(B) (#xaa2 . ?$,1rb(B) @@ -1745,93 +1746,93 @@ as returned by `x-server-vendor'." (#xaa6 . ?$,1rh(B) (#xaa7 . ?$,1ri(B) (#xaa8 . ?$,1rj(B) - (#xaa9 . ?$,1rt(B) - (#xaaa . ?$,1rs(B) - (#xaae . ?$,1s&(B) - (#xaaf . ?$,1s%(B) - (#xab0 . ?$,1v3(B) - (#xab1 . ?$,1v4(B) - (#xab2 . ?$,1v5(B) + (#xaa9 . ?$(G!7(B) + (#xaaa . ?$(G!9(B) + (#xaae . ?$A!-(B) + (#xaaf . ?$(G!-(B) + (#xab0 . ?$(O'x(B) + (#xab1 . ?$(O'y(B) + (#xab2 . ?$(O'z(B) (#xab3 . ?$,1v6(B) (#xab4 . ?$,1v7(B) (#xab5 . ?$,1v8(B) (#xab6 . ?$,1v9(B) (#xab7 . ?$,1v:(B) - (#xab8 . ?$,1uE(B) + (#xab8 . ?$(G""(B) (#xabb . ?$,1rr(B) (#xabc . ?$,1{)(B) (#xabe . ?$,1{*(B) - (#xac3 . ?$,1v;(B) - (#xac4 . ?$,1v<(B) - (#xac5 . ?$,1v=(B) - (#xac6 . ?$,1v>(B) - (#xac9 . ?$,1ub(B) + (#xac3 . ?$(C({(B) + (#xac4 . ?$(C(|(B) + (#xac5 . ?$(C(}(B) + (#xac6 . ?$(C(~(B) + (#xac9 . ?$(D"o(B) (#xaca . ?$,2"s(B) - (#xacc . ?$,2"!(B) - (#xacd . ?$,2!w(B) - (#xace . ?$,2"+(B) + (#xacc . ?$(O##(B) + (#xacd . ?$(O#!(B) + (#xace . ?$A!p(B) (#xacf . ?$,2!o(B) - (#xad0 . ?$,1rx(B) - (#xad1 . ?$,1ry(B) - (#xad2 . ?$,1r|(B) - (#xad3 . ?$,1r}(B) + (#xad0 . ?,F!(B) + (#xad1 . ?,F"(B) + (#xad2 . ?,Y4(B) + (#xad3 . ?,Y!(B) (#xad4 . ?$,1u^(B) - (#xad6 . ?$,1s2(B) - (#xad7 . ?$,1s3(B) + (#xad6 . ?$A!d(B) + (#xad7 . ?$A!e(B) (#xad9 . ?$,2%](B) (#xadb . ?$,2!l(B) - (#xadc . ?$,2" (B) - (#xadd . ?$,2!v(B) - (#xade . ?$,2"/(B) + (#xadc . ?$(O#$(B) + (#xadd . ?$(O#"(B) + (#xade . ?$A!q(B) (#xadf . ?$,2!n(B) - (#xae0 . ?$,2"F(B) + (#xae0 . ?$(O#?(B) (#xae1 . ?$,2!k(B) (#xae2 . ?$,2!m(B) - (#xae3 . ?$,2!s(B) - (#xae4 . ?$,2!}(B) - (#xae5 . ?$,2"f(B) - (#xae6 . ?$,1s"(B) + (#xae3 . ?$A!w(B) + (#xae4 . ?$(G!}(B) + (#xae5 . ?$A!n(B) + (#xae6 . ?$(O#@(B) (#xae7 . ?$,2!j(B) - (#xae8 . ?$,2!r(B) - (#xae9 . ?$,2!|(B) - (#xaea . ?$,2"|(B) - (#xaeb . ?$,2"~(B) - (#xaec . ?$,2#c(B) - (#xaed . ?$,2#f(B) - (#xaee . ?$,2#e(B) + (#xae8 . ?$A!x(B) + (#xae9 . ?$(G!~(B) + (#xaea . ?$(C"P(B) + (#xaeb . ?$(O-~(B) + (#xaec . ?$(O&@(B) + (#xaed . ?$(O&<(B) + (#xaee . ?$(O&>(B) (#xaf0 . ?$,2%`(B) - (#xaf1 . ?$,1s (B) - (#xaf2 . ?$,1s!(B) - (#xaf3 . ?$,2%S(B) + (#xaf1 . ?$B"w(B) + (#xaf2 . ?$B"x(B) + (#xaf3 . ?$(O'{(B) (#xaf4 . ?$,2%W(B) - (#xaf5 . ?$,2#o(B) - (#xaf6 . ?$,2#m(B) - (#xaf7 . ?$,2#B(B) - (#xaf8 . ?$,2#@(B) - (#xaf9 . ?$,2"n(B) + (#xaf5 . ?$B"t(B) + (#xaf6 . ?$B"u(B) + (#xaf7 . ?$A!a(B) + (#xaf8 . ?$A!b(B) + (#xaf9 . ?$(O&g(B) (#xafa . ?$,1zu(B) (#xafb . ?$,1uW(B) (#xafc . ?$,1s8(B) (#xafd . ?$,1rz(B) - (#xafe . ?$,1r~(B) + (#xafe . ?,Y%(B) ;; APL (#xba3 . ?<) (#xba6 . ?>) - (#xba8 . ?$,1xH(B) - (#xba9 . ?$,1xG(B) + (#xba8 . ?$A!E(B) + (#xba9 . ?$A!D(B) (#xbc0 . ?,A/(B) - (#xbc2 . ?$,1ye(B) - (#xbc3 . ?$,1xI(B) + (#xbc2 . ?$A!M(B) + (#xbc3 . ?$A!I(B) (#xbc4 . ?$,1zj(B) (#xbc6 . ?_) (#xbca . ?$,1x8(B) (#xbcc . ?$,1|5(B) (#xbce . ?$,1yd(B) - (#xbcf . ?$,2"+(B) + (#xbcf . ?$A!p(B) (#xbd3 . ?$,1zh(B) - (#xbd6 . ?$,1xJ(B) - (#xbd8 . ?$,1yC(B) - (#xbda . ?$,1yB(B) + (#xbd6 . ?$A!H(B) + (#xbd8 . ?$B"?(B) + (#xbda . ?$B">(B) (#xbdc . ?$,1yb(B) (#xbfc . ?$,1yc(B) ;; Hebrew @@ -2046,7 +2047,7 @@ as returned by `x-server-vendor'." ;; Latin-9 (#x13bc . ?,b<(B) (#x13bd . ?,b=(B) - (#x13be . ?,b>(B) + (#x13be . ?,_/(B) ;; Currency (#x20a0 . ?$,1t@(B) (#x20a1 . ?$,1tA(B) @@ -2370,28 +2371,6 @@ order until succeed.") ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). (create-fontset-from-x-resource) -;; Try to create a fontset from a font specification which comes -;; from initial-frame-alist, default-frame-alist, or X resource. -;; A font specification in command line argument (i.e. -fn XXXX) -;; should be already in default-frame-alist as a `font' -;; parameter. However, any font specifications in site-start -;; library, user's init file (.emacs), and default.el are not -;; yet handled here. - -(let ((font (or (cdr (assq 'font initial-frame-alist)) - (cdr (assq 'font default-frame-alist)) - (x-get-resource "font" "Font"))) - xlfd-fields resolved-name) - (if (and font - (not (query-fontset font)) - (setq resolved-name (x-resolve-font-name font)) - (setq xlfd-fields (x-decompose-font-name font))) - (if (string= "fontset" (aref xlfd-fields xlfd-regexp-registry-subnum)) - (new-fontset font (x-complement-fontset-spec xlfd-fields nil)) - ;; Create a fontset from FONT. The fontset name is - ;; generated from FONT. - (create-fontset-from-ascii-font font resolved-name "startup")))) - ;; Apply a geometry resource to the initial frame. Put it at the end ;; of the alist, so that anything specified on the command line takes ;; precedence. |