diff options
| author | Kenichi Handa | 1998-07-03 04:39:22 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-07-03 04:39:22 +0000 |
| commit | 68404bed20162f179145dc2d033a2713e86a278f (patch) | |
| tree | 849541824e86109e969fcb9934ee6d5e6205bcbd | |
| parent | 53caf287d1103f41f16bbb697c19aed16e9651ac (diff) | |
| download | emacs-68404bed20162f179145dc2d033a2713e86a278f.tar.gz emacs-68404bed20162f179145dc2d033a2713e86a278f.zip | |
Fill weight and slant fields of a fontset
generted from the specified ASCII font by values got from the
resolved ASCII font name.
| -rw-r--r-- | lisp/term/x-win.el | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 46a05a51280..d9370a66536 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -674,10 +674,10 @@ 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 | xlfd-fields resolved-name) |
| 678 | (if (and font | 678 | (if (and font |
| 679 | (not (query-fontset font)) | 679 | (not (query-fontset font)) |
| 680 | (x-resolve-font-name font) | 680 | (setq resolved-name (x-resolve-font-name font)) |
| 681 | (setq xlfd-fields (x-decompose-font-name font))) | 681 | (setq xlfd-fields (x-decompose-font-name font))) |
| 682 | (if (string= "fontset" | 682 | (if (string= "fontset" |
| 683 | (aref xlfd-fields xlfd-regexp-registry-subnum)) | 683 | (aref xlfd-fields xlfd-regexp-registry-subnum)) |
| @@ -703,6 +703,23 @@ This is in addition to the primary selection.") | |||
| 703 | (aset xlfd-fields xlfd-regexp-family-subnum nil) | 703 | (aset xlfd-fields xlfd-regexp-family-subnum nil) |
| 704 | (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") | 704 | (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") |
| 705 | (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") | 705 | (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") |
| 706 | ;; The fontset name should have concrete values in | ||
| 707 | ;; weight and slant field. | ||
| 708 | (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum)) | ||
| 709 | (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) | ||
| 710 | xlfd-temp) | ||
| 711 | (if (or (not weight) (string-match "[*?]*" weight)) | ||
| 712 | (progn | ||
| 713 | (setq xlfd-temp (x-decompose-font-name resolved-name)) | ||
| 714 | (aset xlfd-fields xlfd-regexp-weight-subnum | ||
| 715 | (aref xlfd-temp xlfd-regexp-weight-subnum)))) | ||
| 716 | (if (or (not slant) (string-match "[*?]*" slant)) | ||
| 717 | (progn | ||
| 718 | (or xlfd-temp | ||
| 719 | (setq xlfd-temp | ||
| 720 | (x-decompose-font-name resolved-name))) | ||
| 721 | (aset xlfd-fields xlfd-regexp-slant-subnum | ||
| 722 | (aref xlfd-temp xlfd-regexp-slant-subnum))))) | ||
| 706 | (setq fontset (x-compose-font-name xlfd-fields)) | 723 | (setq fontset (x-compose-font-name xlfd-fields)) |
| 707 | (create-fontset-from-fontset-spec | 724 | (create-fontset-from-fontset-spec |
| 708 | (concat fontset ", ascii:" font) styles) | 725 | (concat fontset ", ascii:" font) styles) |