diff options
| author | Kenichi Handa | 2006-03-03 11:47:04 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-03-03 11:47:04 +0000 |
| commit | 09fd851a79ea54287a9a6f41047e79d4b0e6a08d (patch) | |
| tree | 76d0645420dc54bd41d0e82cb299799914f26247 | |
| parent | 6f0e87cb689fcac8a2949a00247045c1c5ee18c2 (diff) | |
| download | emacs-09fd851a79ea54287a9a6f41047e79d4b0e6a08d.tar.gz emacs-09fd851a79ea54287a9a6f41047e79d4b0e6a08d.zip | |
(create-fontset-from-fontset-spec): Fix
for the case that a charset is specified as target.
| -rw-r--r-- | lisp/international/fontset.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index d7fe6e28e55..4bad7244161 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el | |||
| @@ -573,7 +573,7 @@ Done when `mouse-set-font' is called." | |||
| 573 | (if (not (string-match "^fontset-\\(.*\\)$" nickname)) | 573 | (if (not (string-match "^fontset-\\(.*\\)$" nickname)) |
| 574 | (setq nickname family) | 574 | (setq nickname family) |
| 575 | (setq nickname (match-string 1 nickname))) | 575 | (setq nickname (match-string 1 nickname))) |
| 576 | (if (and size (> (string-to-int size) 0)) | 576 | (if (and size (> (string-to-number size) 0)) |
| 577 | (setq name (format "%s: %s-dot" nickname size)) | 577 | (setq name (format "%s: %s-dot" nickname size)) |
| 578 | (setq name nickname)) | 578 | (setq name nickname)) |
| 579 | (and weight | 579 | (and weight |
| @@ -670,7 +670,7 @@ which case, the corresponding script is decided by the variable | |||
| 670 | (error "Invalid fontset spec: %s" fontset-spec)) | 670 | (error "Invalid fontset spec: %s" fontset-spec)) |
| 671 | (let ((idx (match-end 0)) | 671 | (let ((idx (match-end 0)) |
| 672 | (name (match-string 0 fontset-spec)) | 672 | (name (match-string 0 fontset-spec)) |
| 673 | xlfd-fields script fontlist) | 673 | xlfd-fields target script fontlist) |
| 674 | (setq xlfd-fields (x-decompose-font-name name)) | 674 | (setq xlfd-fields (x-decompose-font-name name)) |
| 675 | (or xlfd-fields | 675 | (or xlfd-fields |
| 676 | (error "Fontset name \"%s\" not conforming to XLFD" name)) | 676 | (error "Fontset name \"%s\" not conforming to XLFD" name)) |
| @@ -678,18 +678,19 @@ which case, the corresponding script is decided by the variable | |||
| 678 | ;; At first, extract pairs of charset and fontname from FONTSET-SPEC. | 678 | ;; At first, extract pairs of charset and fontname from FONTSET-SPEC. |
| 679 | (while (string-match "[, \t\n]*\\([^:]+\\):\\([^,]+\\)" fontset-spec idx) | 679 | (while (string-match "[, \t\n]*\\([^:]+\\):\\([^,]+\\)" fontset-spec idx) |
| 680 | (setq idx (match-end 0)) | 680 | (setq idx (match-end 0)) |
| 681 | (setq script (intern (match-string 1 fontset-spec))) | 681 | (setq target (intern (match-string 1 fontset-spec))) |
| 682 | (if (or (eq script 'ascii) | 682 | (cond ((or (eq target 'ascii) |
| 683 | (memq script (char-table-extra-slot char-script-table 0)) | 683 | (memq target (char-table-extra-slot char-script-table 0)) |
| 684 | (setq script (cdr (assq script charset-script-alist)))) | 684 | (setq script (cdr (assq script charset-script-alist)))) |
| 685 | (setq fontlist (cons (list script (match-string 2 fontset-spec)) | 685 | (push (list script (match-string 2 fontset-spec)) fontlist)) |
| 686 | fontlist)))) | 686 | ((charsetp target) |
| 687 | (push (list target (match-string 2 fontset-spec)) fontlist)))) | ||
| 687 | 688 | ||
| 688 | ;; Complement FONTLIST. | 689 | ;; Complement FONTLIST. |
| 689 | (setq fontlist (x-complement-fontset-spec xlfd-fields fontlist)) | 690 | (setq fontlist (x-complement-fontset-spec xlfd-fields fontlist)) |
| 690 | 691 | ||
| 691 | ;; Create a fontset. | 692 | ;; Create a fontset. |
| 692 | (new-fontset name fontlist))) | 693 | (new-fontset name (nreverse fontlist)))) |
| 693 | 694 | ||
| 694 | (defun create-fontset-from-ascii-font (font &optional resolved-font | 695 | (defun create-fontset-from-ascii-font (font &optional resolved-font |
| 695 | fontset-name) | 696 | fontset-name) |