summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-06-12 07:10:59 +0000
committerKenichi Handa <handa@m17n.org>1998-06-12 07:10:59 +0000
commit307245bcdf513b3c2e4812d406594fa71b071ced (patch)
tree0207ecea2f3130393f2aa2f43c6dc3e8d8b3f5e8
parent7b7714f9fcb166a0ded84f2b3b7fd39542be6fa4 (diff)
downloademacs-307245bcdf513b3c2e4812d406594fa71b071ced.tar.gz
While creating fontsets of style variants, pay
attention to X resources XXX.attributeFont.
-rw-r--r--lisp/term/x-win.el32
1 files changed, 21 insertions, 11 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 2d3a0a98359..3a5cd81d28d 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -677,26 +677,36 @@ This is in addition to the primary selection.")
resolved-name xlfd-fields)
(if (and font
(not (query-fontset font))
- (setq resolved-name (or (x-resolve-font-name font) font))
+ (setq resolved-name (x-resolve-font-name font))
(setq xlfd-fields (x-decompose-font-name resolved-name)))
(if (string= "fontset"
(aref xlfd-fields xlfd-regexp-registry-subnum))
(new-fontset font (x-complement-fontset-spec xlfd-fields nil))
- (let (fontset fontset-spec)
- ;; Create a fontset from FONT. The name is also
- ;; generated from FONT.
+ ;; Create a fontset from FONT. The fontset name is
+ ;; generated from FONT. Create style variants of the
+ ;; fontset too. Font names in the variants are
+ ;; generated automatially unless X resources
+ ;; XXX.attribyteFont explicitly specify them.
+ (let ((styles (mapcar 'car x-style-funcs-alist))
+ (faces '(bold italic bold-italic))
+ face face-font fontset fontset-spec)
+ (while faces
+ (setq face (car faces))
+ (setq face-font (x-get-resource (concat (symbol-name face)
+ ".attributeFont")
+ "Face.AttributeFont"))
+ (if face-font
+ (setq styles (cons (cons face face-font)
+ (delq face styles))))
+ (setq faces (cdr faces)))
(aset xlfd-fields xlfd-regexp-foundry-subnum nil)
(aset xlfd-fields xlfd-regexp-family-subnum nil)
- (aset xlfd-fields xlfd-regexp-adstyle-subnum nil)
- (aset xlfd-fields xlfd-regexp-avgwidth-subnum nil)
(aset xlfd-fields xlfd-regexp-registry-subnum "fontset")
(aset xlfd-fields xlfd-regexp-encoding-subnum "startup")
(setq fontset (x-compose-font-name xlfd-fields))
- (setq fontset-spec (concat fontset ", ascii:" resolved-name))
- (create-fontset-from-fontset-spec fontset-spec t)
- (setq fontset-alias-alist
- (cons (cons fontset font) fontset-alias-alist)))
- )))))
+ (create-fontset-from-fontset-spec
+ (concat fontset ", ascii:" font) styles)
+ ))))))
;; Sun expects the menu bar cut and paste commands to use the clipboard.
;; This has ,? to match both on Sunos and on Solaris.