diff options
| author | Kenichi Handa | 1997-03-19 16:38:41 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-03-19 16:38:41 +0000 |
| commit | 6b1e91e3c1f1a5183568cc5b5b01a77d60ba6720 (patch) | |
| tree | 1fe00131c6c8a05fd89a95cad0faeb2f2567ad65 | |
| parent | b5210ea72e8c1cc6b69ba5fd1a43289559cfa980 (diff) | |
| download | emacs-6b1e91e3c1f1a5183568cc5b5b01a77d60ba6720.tar.gz emacs-6b1e91e3c1f1a5183568cc5b5b01a77d60ba6720.zip | |
(x-complement-fontset-spec): Setup
alternative-fontname-alist while complementing fontnames.
| -rw-r--r-- | lisp/international/fontset.el | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 9c8c2766e8f..0d4c5ee8f5c 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el | |||
| @@ -222,25 +222,40 @@ FONTLIST is an alist of cons of charset and fontname. | |||
| 222 | Fontnames for charsets not listed in FONTLIST are generated from | 222 | Fontnames for charsets not listed in FONTLIST are generated from |
| 223 | XLFD-FIELDS and a property of x-charset-register of each charset | 223 | XLFD-FIELDS and a property of x-charset-register of each charset |
| 224 | automatically." | 224 | automatically." |
| 225 | (let ((charsets charset-list)) | 225 | (let ((charsets charset-list) |
| 226 | (loose-xlfd-fields (copy-sequence xlfd-fields))) | ||
| 227 | (aset loose-xlfd-fields xlfd-regexp-pixelsize-subnum nil) | ||
| 228 | (aset loose-xlfd-fields xlfd-regexp-pointsize-subnum nil) | ||
| 229 | (aset loose-xlfd-fields xlfd-regexp-resx-subnum nil) | ||
| 230 | (aset loose-xlfd-fields xlfd-regexp-resy-subnum nil) | ||
| 231 | (aset loose-xlfd-fields xlfd-regexp-spacing-subnum nil) | ||
| 232 | (aset loose-xlfd-fields xlfd-regexp-avgwidth-subnum nil) | ||
| 226 | (while charsets | 233 | (while charsets |
| 227 | (let ((charset (car charsets))) | 234 | (let ((charset (car charsets))) |
| 228 | (if (null (assq charset fontlist)) | 235 | (if (null (assq charset fontlist)) |
| 229 | (let ((registry (get-charset-property charset | 236 | (let ((registry (get-charset-property charset |
| 230 | 'x-charset-registry))) | 237 | 'x-charset-registry)) |
| 238 | registry-val encoding-val fontname loose-fontname) | ||
| 231 | (if (string-match "-" registry) | 239 | (if (string-match "-" registry) |
| 232 | ;; REGISTRY contains `CHARSET_ENCODING' field. | 240 | ;; REGISTRY contains `CHARSET_ENCODING' field. |
| 233 | (progn | 241 | (setq registry-val (substring registry 0 (match-beginning 0)) |
| 234 | (aset xlfd-fields xlfd-regexp-registry-subnum | 242 | encoding-val (substring registry (match-end 0))) |
| 235 | (substring registry 0 (match-beginning 0))) | 243 | (setq registry-val (concat registry "*") |
| 236 | (aset xlfd-fields xlfd-regexp-encoding-subnum | 244 | encoding-val "*")) |
| 237 | (substring registry (match-end 0)))) | 245 | (aset xlfd-fields xlfd-regexp-registry-subnum registry-val) |
| 238 | (aset xlfd-fields xlfd-regexp-registry-subnum | 246 | (aset xlfd-fields xlfd-regexp-encoding-subnum encoding-val) |
| 239 | (concat registry "*")) | 247 | (aset loose-xlfd-fields xlfd-regexp-registry-subnum registry-val) |
| 240 | (aset xlfd-fields xlfd-regexp-encoding-subnum "*")) | 248 | (aset loose-xlfd-fields xlfd-regexp-encoding-subnum encoding-val) |
| 241 | (setq fontlist | 249 | (setq fontname (x-compose-font-name xlfd-fields t)) |
| 242 | (cons (cons charset (x-compose-font-name xlfd-fields t)) | 250 | (setq fontlist (cons (cons charset fontname) fontlist)) |
| 243 | fontlist))))) | 251 | (or (assoc fontname alternative-fontname-alist) |
| 252 | (setq alternative-fontname-alist | ||
| 253 | (cons (list | ||
| 254 | fontname | ||
| 255 | (x-compose-font-name loose-xlfd-fields t) | ||
| 256 | (concat "*-" registry-val "-" encoding-val)) | ||
| 257 | alternative-fontname-alist))) | ||
| 258 | ))) | ||
| 244 | (setq charsets (cdr charsets)))) | 259 | (setq charsets (cdr charsets)))) |
| 245 | fontlist) | 260 | fontlist) |
| 246 | 261 | ||