Mercurial > hg > xemacs-beta
comparison lisp/msw-faces.el @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 3ecd8885ac67 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
27 ;; Boston, MA 02111-1307, USA. | 27 ;; Boston, MA 02111-1307, USA. |
28 | 28 |
29 ;; This file does the magic to parse mswindows font names, and make sure that | 29 ;; This file does the magic to parse mswindows font names, and make sure that |
30 ;; the default and modeline attributes of new frames are specified enough. | 30 ;; the default and modeline attributes of new frames are specified enough. |
31 | 31 |
32 ;;; Force creation of the default face font so that if it fails we get an | |
33 ;;; error now instead of a crash at frame creation. | |
34 (defun mswindows-init-device-faces (device) | 32 (defun mswindows-init-device-faces (device) |
35 (unless (face-font-instance 'default device) | 33 (let ((color-default (device-system-metric device 'color-default)) |
36 (error "Can't find a suitable default font"))) | 34 (color-3d-face (device-system-metric device 'color-3d-face))) |
37 | 35 ; Force creation of the default face font so that if it fails we get |
36 ; an error now instead of a crash at frame creation. | |
37 (unless (face-font-instance 'default device) | |
38 (error "Can't find a suitable default font")) | |
39 | |
40 (if (car color-default) | |
41 (set-face-foreground 'default (car color-default)) device) | |
42 (if (cdr color-default) | |
43 (set-face-background 'default (cdr color-default)) device) | |
44 (if (car color-3d-face) | |
45 (set-face-foreground 'gui-element (car color-3d-face)) device) | |
46 (if (cdr color-3d-face) | |
47 (set-face-background 'gui-element (cdr color-3d-face)) device) | |
48 (set-face-font 'gui-element "MS Sans Serif:Regular:8" device))) | |
38 | 49 |
39 (defun mswindows-init-frame-faces (frame) | 50 (defun mswindows-init-frame-faces (frame) |
40 ) | 51 ) |
41 | 52 |
42 ;; Other functions expect these regexps | 53 ;; Other functions expect these regexps |