diff options
| author | Kenichi Handa | 1998-05-21 01:47:32 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-05-21 01:47:32 +0000 |
| commit | 25c343b25ce6a3bbb9ebd7d8679ac7d99eb2828a (patch) | |
| tree | e7277730858ebc498e2421b967e8ecba76e467d1 | |
| parent | a041ba9753b4f0c1cbf41f0b72909c8058bcc73f (diff) | |
| download | emacs-25c343b25ce6a3bbb9ebd7d8679ac7d99eb2828a.tar.gz emacs-25c343b25ce6a3bbb9ebd7d8679ac7d99eb2828a.zip | |
Generate style variants fontset for
standard-fontset-spec. Generate a fontset based on resolved font
name of a font specified by X resource or -fn command line arg.
| -rw-r--r-- | lisp/term/x-win.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 1557a6dd5bf..2d3a0a98359 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -658,7 +658,7 @@ This is in addition to the primary selection.") | |||
| 658 | (if (fboundp 'new-fontset) | 658 | (if (fboundp 'new-fontset) |
| 659 | (progn | 659 | (progn |
| 660 | ;; Create the standard fontset. | 660 | ;; Create the standard fontset. |
| 661 | (create-fontset-from-fontset-spec standard-fontset-spec) | 661 | (create-fontset-from-fontset-spec standard-fontset-spec t) |
| 662 | 662 | ||
| 663 | ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). | 663 | ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). |
| 664 | (create-fontset-from-x-resource) | 664 | (create-fontset-from-x-resource) |
| @@ -674,10 +674,11 @@ This is in addition to the primary selection.") | |||
| 674 | (let ((font (or (cdr (assq 'font initial-frame-alist)) | 674 | (let ((font (or (cdr (assq 'font initial-frame-alist)) |
| 675 | (cdr (assq 'font default-frame-alist)) | 675 | (cdr (assq 'font default-frame-alist)) |
| 676 | (x-get-resource "font" "Font"))) | 676 | (x-get-resource "font" "Font"))) |
| 677 | xlfd-fields) | 677 | resolved-name xlfd-fields) |
| 678 | (if (and font | 678 | (if (and font |
| 679 | (not (query-fontset font)) | 679 | (not (query-fontset font)) |
| 680 | (setq xlfd-fields (x-decompose-font-name font))) | 680 | (setq resolved-name (or (x-resolve-font-name font) font)) |
| 681 | (setq xlfd-fields (x-decompose-font-name resolved-name))) | ||
| 681 | (if (string= "fontset" | 682 | (if (string= "fontset" |
| 682 | (aref xlfd-fields xlfd-regexp-registry-subnum)) | 683 | (aref xlfd-fields xlfd-regexp-registry-subnum)) |
| 683 | (new-fontset font (x-complement-fontset-spec xlfd-fields nil)) | 684 | (new-fontset font (x-complement-fontset-spec xlfd-fields nil)) |
| @@ -691,7 +692,7 @@ This is in addition to the primary selection.") | |||
| 691 | (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") | 692 | (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") |
| 692 | (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") | 693 | (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") |
| 693 | (setq fontset (x-compose-font-name xlfd-fields)) | 694 | (setq fontset (x-compose-font-name xlfd-fields)) |
| 694 | (setq fontset-spec (concat fontset ", ascii:" font)) | 695 | (setq fontset-spec (concat fontset ", ascii:" resolved-name)) |
| 695 | (create-fontset-from-fontset-spec fontset-spec t) | 696 | (create-fontset-from-fontset-spec fontset-spec t) |
| 696 | (setq fontset-alias-alist | 697 | (setq fontset-alias-alist |
| 697 | (cons (cons fontset font) fontset-alias-alist))) | 698 | (cons (cons fontset font) fontset-alias-alist))) |