Mercurial > hg > xemacs-beta
comparison lisp/msw-faces.el @ 213:78f53ef88e17 r20-4b5
Import from CVS: tag r20-4b5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:06:47 +0200 |
parents | |
children | 1f0dabaa0855 |
comparison
equal
deleted
inserted
replaced
212:d8688acf4c5b | 213:78f53ef88e17 |
---|---|
1 ;;; msw-faces.el --- mswindows-specific face stuff. | |
2 | |
3 ;;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. | |
4 ;;; Copyright (C) 1995, 1996 Ben Wing. | |
5 | |
6 ;; Author: Jamie Zawinski | |
7 ;; Modified by: Chuck Thompson | |
8 ;; Modified by: Ben Wing | |
9 ;; Modified by: Martin Buchholz | |
10 ;; Rewritten for mswindows by: Jonathan Harris | |
11 | |
12 ;; This file is part of XEmacs. | |
13 | |
14 ;; XEmacs is free software; you can redistribute it and/or modify it | |
15 ;; under the terms of the GNU General Public License as published by | |
16 ;; the Free Software Foundation; either version 2, or (at your option) | |
17 ;; any later version. | |
18 | |
19 ;; XEmacs is distributed in the hope that it will be useful, but | |
20 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
22 ;; General Public License for more details. | |
23 | |
24 ;; You should have received a copy of the GNU General Public License | |
25 ;; along with XEmacs; see the file COPYING. If not, write to the | |
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
27 ;; Boston, MA 02111-1307, USA. | |
28 | |
29 ;; This file does the magic to parse mswindows font names, and make sure that the | |
30 ;; default and modeline attributes of new frames are specified enough. | |
31 | |
32 (defun mswindows-init-global-faces () | |
33 ) | |
34 | |
35 ;;; ensure that the default face has some reasonable fallbacks if nothing | |
36 ;;; else is specified. | |
37 (defun mswindows-init-device-faces (device) | |
38 (or (face-font 'default 'global) | |
39 (set-face-font 'default "Courier New:Regular:10") | |
40 'global) | |
41 (or (face-foreground 'default 'global) | |
42 (set-face-foreground 'default "black" 'global 'mswindows)) | |
43 (or (face-background 'default 'global) | |
44 (set-face-background 'default "white" 'global 'mswindows)) | |
45 (or (face-background 'modeline 'global) | |
46 (set-face-background 'modeline "grey75" 'global 'mswindows)) | |
47 ) | |
48 | |
49 | |
50 (defun mswindows-init-frame-faces (frame) | |
51 ) | |
52 | |
53 | |
54 ;;; Fill in missing parts of a font spec. This is primarily intended as a | |
55 ;;; helper function for the functions below. | |
56 ;;; mswindows fonts look like: | |
57 ;;; fontname[:[weight ][style][:pointsize[:effects[:charset]]]] | |
58 ;;; A minimal mswindows font spec looks like: | |
59 ;;; Courier New | |
60 ;;; A maximal mswindows font spec looks like: | |
61 ;;; Courier New:Bold Italic:10:underline strikeout:ansi | |
62 ;;; Missing parts of the font spec should be filled in with these values: | |
63 ;;; Courier New:Normal:10::ansi | |
64 (defun mswindows-canicolize-font (font &optional device) | |
65 "Given a mswindows font specification, this converts it to canonical form." | |
66 nil) | |
67 | |
68 (defun mswindows-make-font-bold (font &optional device) | |
69 "Given a mswindows font specification, this attempts to make a bold font. | |
70 If it fails, it returns nil." | |
71 nil) | |
72 | |
73 (defun mswindows-make-font-unbold (font &optional device) | |
74 "Given a mswindows font specification, this attempts to make a non-bold font. | |
75 If it fails, it returns nil." | |
76 nil) | |
77 | |
78 (defun mswindows-make-font-italic (font &optional device) | |
79 "Given a mswindows font specification, this attempts to make an `italic' font. | |
80 If it fails, it returns nil." | |
81 nil) | |
82 | |
83 (defun mswindows-make-font-unitalic (font &optional device) | |
84 "Given a mswindows font specification, this attempts to make a non-italic font. | |
85 If it fails, it returns nil." | |
86 nil) | |
87 | |
88 (defun mswindows-make-font-bold-italic (font &optional device) | |
89 "Given a mswindows font specification, this attempts to make a `bold-italic' | |
90 font. If it fails, it returns nil." | |
91 nil) | |
92 | |
93 (defun mswindows-find-smaller-font (font &optional device) | |
94 "Loads a new, version of the given font (or font name). | |
95 Returns the font if it succeeds, nil otherwise. | |
96 If scalable fonts are available, this returns a font which is 1 point smaller. | |
97 Otherwise, it returns the next smaller version of this font that is defined." | |
98 nil) | |
99 | |
100 (defun mswindows-find-larger-font (font &optional device) | |
101 "Loads a new, slightly larger version of the given font (or font name). | |
102 Returns the font if it succeeds, nil otherwise. | |
103 If scalable fonts are available, this returns a font which is 1 point larger. | |
104 Otherwise, it returns the next larger version of this font that is defined." | |
105 nil) |