summaryrefslogtreecommitdiff
path: root/lisp/term/w32-win.el
diff options
context:
space:
mode:
authorAndrew Innes <andrewi@gnu.org>1999-05-02 20:39:19 +0000
committerAndrew Innes <andrewi@gnu.org>1999-05-02 20:39:19 +0000
commit81af6e72e267e16bdf3c122bbaaa99e242abaa46 (patch)
tree239e095e94b2e01ee69a017a836b2486cb17655f /lisp/term/w32-win.el
parent27401ec762a3101e6ab8a162ca5f96e1d520fabb (diff)
downloademacs-81af6e72e267e16bdf3c122bbaaa99e242abaa46.tar.gz
(mouse-set-font): Ensure constructed fontset
matches the font selected in the dialog.
Diffstat (limited to 'lisp/term/w32-win.el')
-rw-r--r--lisp/term/w32-win.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 5f1f6d4ab09..39eb15bac29 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -900,7 +900,7 @@ with the font."
(if (fboundp 'new-fontset)
(append w32-fixed-font-alist (list (generate-fontset-menu)))))))
(if fonts
- (let (font fontset)
+ (let (font fontset xlfd resolved-font)
(while fonts
(condition-case nil
(progn
@@ -908,7 +908,17 @@ with the font."
(if (fontset-name-p font)
(setq fontset font)
(condition-case nil
- (setq fontset (create-fontset-from-ascii-font font))
+ (setq resolved-font (x-resolve-font-name font)
+ xlfd (x-decompose-font-name resolved-font)
+ fontset
+ (create-fontset-from-ascii-font
+ font resolved-font
+ (format "%s_%s_%s_%s"
+ (aref xlfd xlfd-regexp-family-subnum)
+ (aref xlfd xlfd-regexp-registry-subnum)
+ (aref xlfd xlfd-regexp-encoding-subnum)
+ (aref xlfd
+ xlfd-regexp-pixelsize-subnum))))
(error nil)))
(if fontset
(set-default-font fontset)