diff options
| author | Kenichi Handa | 1997-05-16 00:58:58 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-05-16 00:58:58 +0000 |
| commit | 9899214ca9dd4ce61175d30db4530eadeb050ac8 (patch) | |
| tree | 7f67a4529c4886592128f80b60725336853e7cce /lisp/term | |
| parent | 13d5617d046fca406276dc7a923db3ea7750a1a7 (diff) | |
| download | emacs-9899214ca9dd4ce61175d30db4530eadeb050ac8.tar.gz emacs-9899214ca9dd4ce61175d30db4530eadeb050ac8.zip | |
Create bold, italic, bold-italic variants of
startup fontset.
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/x-win.el | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 9c73af5df51..f8c60808cff 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -648,12 +648,12 @@ This is in addition to the primary selection.") | |||
| 648 | 648 | ||
| 649 | (if (fboundp 'new-fontset) | 649 | (if (fboundp 'new-fontset) |
| 650 | (progn | 650 | (progn |
| 651 | ;; Create a default fontset. | 651 | ;; Create the standard fontset. |
| 652 | (create-fontset-from-fontset-spec default-fontset-spec) | 652 | (create-fontset-from-fontset-spec standard-fontset-spec) |
| 653 | ;; Create variants of a default fontset. | 653 | ;; Create variants of the standard fontset. |
| 654 | (create-fontset-from-fontset-spec default-fontset-spec 'bold) | 654 | (create-fontset-from-fontset-spec standard-fontset-spec 'bold) |
| 655 | (create-fontset-from-fontset-spec default-fontset-spec 'italic) | 655 | (create-fontset-from-fontset-spec standard-fontset-spec 'italic) |
| 656 | (create-fontset-from-fontset-spec default-fontset-spec 'bold-italic) | 656 | (create-fontset-from-fontset-spec standard-fontset-spec 'bold-italic) |
| 657 | 657 | ||
| 658 | ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). | 658 | ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). |
| 659 | (create-fontset-from-x-resource) | 659 | (create-fontset-from-x-resource) |
| @@ -669,30 +669,30 @@ This is in addition to the primary selection.") | |||
| 669 | (let ((font (or (cdr (assq 'font initial-frame-alist)) | 669 | (let ((font (or (cdr (assq 'font initial-frame-alist)) |
| 670 | (cdr (assq 'font default-frame-alist)) | 670 | (cdr (assq 'font default-frame-alist)) |
| 671 | (x-get-resource "font" "Font"))) | 671 | (x-get-resource "font" "Font"))) |
| 672 | xlfd-fields fontlist) | 672 | xlfd-fields) |
| 673 | (if (and font | 673 | (if (and font |
| 674 | (not (query-fontset font)) | 674 | (not (query-fontset font)) |
| 675 | (setq xlfd-fields (x-decompose-font-name font))) | 675 | (setq xlfd-fields (x-decompose-font-name font))) |
| 676 | (let (alias) | 676 | (if (string= "fontset" |
| 677 | (or (string= "fontset" | 677 | (aref xlfd-fields xlfd-regexp-registry-subnum)) |
| 678 | (aref xlfd-fields xlfd-regexp-registry-subnum)) | 678 | (new-fontset font (x-complement-fontset-spec xlfd-fields nil)) |
| 679 | (progn | 679 | (let (fontset fontset-spec) |
| 680 | ;; Create a fontset from FONT. The name is also | 680 | ;; Create a fontset from FONT. The name is also |
| 681 | ;; generated from FONT. | 681 | ;; generated from FONT. |
| 682 | (setq fontlist (list (cons 'ascii font))) | 682 | (aset xlfd-fields xlfd-regexp-foundry-subnum nil) |
| 683 | (aset xlfd-fields xlfd-regexp-foundry-subnum nil) | 683 | (aset xlfd-fields xlfd-regexp-family-subnum nil) |
| 684 | (aset xlfd-fields xlfd-regexp-family-subnum nil) | 684 | (aset xlfd-fields xlfd-regexp-adstyle-subnum nil) |
| 685 | (aset xlfd-fields xlfd-regexp-adstyle-subnum nil) | 685 | (aset xlfd-fields xlfd-regexp-avgwidth-subnum nil) |
| 686 | (aset xlfd-fields xlfd-regexp-avgwidth-subnum nil) | 686 | (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") |
| 687 | (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") | 687 | (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") |
| 688 | (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") | 688 | (setq fontset (x-compose-font-name xlfd-fields)) |
| 689 | (setq alias font | 689 | (setq fontset-spec (concat fontset ", ascii:" font)) |
| 690 | font (x-compose-font-name xlfd-fields)))) | 690 | (create-fontset-from-fontset-spec fontset-spec) |
| 691 | (new-fontset font | 691 | (create-fontset-from-fontset-spec fontset-spec 'bold) |
| 692 | (x-complement-fontset-spec xlfd-fields fontlist)) | 692 | (create-fontset-from-fontset-spec fontset-spec 'italic) |
| 693 | (if alias | 693 | (create-fontset-from-fontset-spec fontset-spec 'bold-italic) |
| 694 | (setq fontset-alias-alist | 694 | (setq fontset-alias-alist |
| 695 | (cons (cons font alias) fontset-alias-alist))) | 695 | (cons (cons fontset font) fontset-alias-alist))) |
| 696 | ))))) | 696 | ))))) |
| 697 | 697 | ||
| 698 | ;; Sun expects the menu bar cut and paste commands to use the clipboard. | 698 | ;; Sun expects the menu bar cut and paste commands to use the clipboard. |