diff lisp/msw-faces.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents a86b2b5e0111
children da8ed4261e83
line wrap: on
line diff
--- a/lisp/msw-faces.el	Mon Aug 13 11:19:22 2007 +0200
+++ b/lisp/msw-faces.el	Mon Aug 13 11:20:41 2007 +0200
@@ -29,40 +29,16 @@
 ;; This file does the magic to parse mswindows font names, and make sure that
 ;; the default and modeline attributes of new frames are specified enough.
 
+;;; Force creation of the default face font so that if it fails we get an
+;;; error now instead of a crash at frame creation.
 (defun mswindows-init-device-faces (device)
-  (let ((color-default (device-system-metric device 'color-default))
-	(color-3d-face (device-system-metric device 'color-3d-face)))
-    ; Force creation of the default face font so that if it fails we get
-    ; an error now instead of a crash at frame creation.
-    (unless (face-font-instance 'default device)
-      (error "Can't find a suitable default font"))
-    
-    (if (car color-default)
-	(set-face-foreground 'default (car color-default)) device)
-    (if (cdr color-default)
-	(set-face-background 'default (cdr color-default)) device)
-    (if (car color-3d-face)
-	(set-face-foreground 'gui-element (car color-3d-face)) device)
-    (if (cdr color-3d-face)
-	(set-face-background 'gui-element (cdr color-3d-face)) device)
-    (set-face-font 'gui-element "MS Sans Serif:Regular:8" device)))
+  (unless (face-font-instance 'default device)
+    (error "Can't find a suitable default font")))
+
 
 (defun mswindows-init-frame-faces (frame)
   )
 
-;; Other functions expect these regexps
-(defconst mswindows-font-regexp
-  (let
-      ((- 		":")
-       (fontname	"\\([a-zA-Z ]+\\)")
-       (weight	"\\([a-zA-Z]*\\)?")
-       (style	"\\( [a-zA-Z]*\\)?")
-       (pointsize	"\\([0-9]+\\)?")
-       (effects	"\\([a-zA-Z ]*\\)?")
-       (charset	"\\([a-zA-Z 0-9]*\\)")
-       )
-    (concat "^"
-	    fontname - weight style - pointsize - effects - charset "$")))
 
 ;;; Fill in missing parts of a font spec. This is primarily intended as a
 ;;; helper function for the functions below.