Mercurial > hg > xemacs-beta
comparison lisp/msw-faces.el @ 280:7df0dd720c89 r21-0b38
Import from CVS: tag r21-0b38
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:32:22 +0200 |
parents | 8efd647ea9ca |
children | c42ec1d1cded |
comparison
equal
deleted
inserted
replaced
279:c20b2fb5bb0a | 280:7df0dd720c89 |
---|---|
59 ;;; Missing parts of the font spec should be filled in with these values: | 59 ;;; Missing parts of the font spec should be filled in with these values: |
60 ;;; Courier New:Normal:10::ansi | 60 ;;; Courier New:Normal:10::ansi |
61 (defun mswindows-font-canicolize-name (font) | 61 (defun mswindows-font-canicolize-name (font) |
62 "Given a mswindows font specification, this returns its name in canonical | 62 "Given a mswindows font specification, this returns its name in canonical |
63 form." | 63 form." |
64 (if (font-instance-p font) | 64 (if (or (font-instance-p font) |
65 (let ((name (font-instance-name font))) | 65 (stringp font)) |
66 (cond ((string-match | 66 (let ((name (if (font-instance-p font) |
67 "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" | 67 (font-instance-name font) |
68 name) name) | 68 font))) |
69 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*$" | 69 (cond ((string-match |
70 name) (concat name ":ansi")) | 70 "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" |
71 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+$" name) | 71 name) name) |
72 (concat name "::ansi")) | 72 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*$" |
73 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*$" name) | 73 name) (concat name ":ansi")) |
74 (concat name ":10::ansi")) | 74 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+$" name) |
75 ((string-match "^[a-zA-Z ]+$" name) | 75 (concat name "::ansi")) |
76 (concat name ":Normal:10::ansi")) | 76 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*$" name) |
77 (t "Courier New:Normal:10::ansi"))))) | 77 (concat name ":10::ansi")) |
78 ((string-match "^[a-zA-Z ]+$" name) | |
79 (concat name ":Normal:10::ansi")) | |
80 (t "Courier New:Normal:10::ansi"))))) | |
78 | 81 |
79 (defun mswindows-make-font-bold (font &optional device) | 82 (defun mswindows-make-font-bold (font &optional device) |
80 "Given a mswindows font specification, this attempts to make a bold font. | 83 "Given a mswindows font specification, this attempts to make a bold font. |
81 If it fails, it returns nil." | 84 If it fails, it returns nil." |
82 (if (font-instance-p font) | 85 (if (font-instance-p font) |