X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmsw-faces.el;h=e77f415fc57a51acba89725c99cb810f2cb0acb6;hb=fc475e6669a613cd6d98eb5511c749a23b63c7ac;hp=b2e52f4f433a944ea9b30b52d0aff34629de0bb6;hpb=72a705551741d6f85a40eea486c222bac482d8dc;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/msw-faces.el b/lisp/msw-faces.el index b2e52f4..e77f415 100644 --- a/lisp/msw-faces.el +++ b/lisp/msw-faces.el @@ -145,6 +145,9 @@ font. If it fails, it returns nil." (defun mswindows-find-smaller-font (font &optional device) "Loads a new version of the given font (or font name) 1 point smaller. Returns the font if it succeeds, nil otherwise." + (if (stringp font) (setq font (make-font-instance font device))) + (if (font-instance-p font) (setq font (font-instance-truename font))) + (if (stringp font) (setq font (make-font-instance font device))) (if (font-instance-p font) (let (old-size (name (mswindows-font-canonicalize-name font))) (string-match "^[a-zA-Z ]+:[a-zA-Z ]*:\\([0-9]+\\):" name) @@ -160,6 +163,9 @@ Returns the font if it succeeds, nil otherwise." (defun mswindows-find-larger-font (font &optional device) "Loads a new version of the given font (or font name) 1 point larger. Returns the font if it succeeds, nil otherwise." + (if (stringp font) (setq font (make-font-instance font device))) + (if (font-instance-p font) (setq font (font-instance-truename font))) + (if (stringp font) (setq font (make-font-instance font device))) (if (font-instance-p font) (let (old-size (name (mswindows-font-canonicalize-name font))) (string-match "^[a-zA-Z ]+:[a-zA-Z ]*:\\([0-9]+\\):" name)