annotate src/objects-msw.c @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 8626e4521993
children a86b2b5e0111
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1 /* mswindows-specific Lisp objects.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
3 Copyright (C) 1995 Board of Trustees, University of Illinois.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
4 Copyright (C) 1995 Tinker Systems.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
5 Copyright (C) 1995, 1996 Ben Wing.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
6 Copyright (C) 1995 Sun Microsystems, Inc.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
7 Copyright (C) 1997 Jonathan Harris.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
8
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
9 This file is part of XEmacs.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
10
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
11 XEmacs is free software; you can redistribute it and/or modify it
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
12 under the terms of the GNU General Public License as published by the
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
13 Free Software Foundation; either version 2, or (at your option) any
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
14 later version.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
15
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
16 XEmacs is distributed in the hope that it will be useful, but WITHOUT
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
19 for more details.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
20
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
21 You should have received a copy of the GNU General Public License
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
22 along with XEmacs; see the file COPYING. If not, write to
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
23 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
24 Boston, MA 02111-1307, USA. */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
25
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
26 /* Synched up with: Not in FSF. */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
27
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
28 /* Authorship:
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
29
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
30 Jamie Zawinski, Chuck Thompson, Ben Wing
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
31 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
32 */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
33
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
34
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
35 /* TODO: palette handling */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
36
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
37 #include <config.h>
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
38 #include "lisp.h"
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
39 #include "hash.h"
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
40
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
41 #include "console-msw.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
42 #include "objects-msw.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
43
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
44 #ifdef MULE
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
45 #include "mule-charset.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
46 #endif
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
47
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
48 #include "buffer.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
49 #include "device.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
50 #include "insdel.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
51
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
52 #if (defined(__CYGWIN32__) || defined(__MINGW32__)) && \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
53 CYGWIN_VERSION_DLL_MAJOR < 21
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 227
diff changeset
54 #define stricmp strcasecmp
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
55 #define FONTENUMPROC FONTENUMEXPROC
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
56 #define ntmTm ntmentm
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 227
diff changeset
57 #endif
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
58
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
59 typedef struct colormap_t
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
60 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
61 const char *name;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
62 const COLORREF colorref;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
63 } colormap_t;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
64
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
65 /* Colors from X11R6 "XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp" */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
66 static const colormap_t mswindows_X_color_map[] =
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
67 {
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
68 {"snow" , PALETTERGB (255, 250, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
69 {"GhostWhite" , PALETTERGB (248, 248, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
70 {"WhiteSmoke" , PALETTERGB (245, 245, 245) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
71 {"gainsboro" , PALETTERGB (220, 220, 220) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
72 {"FloralWhite" , PALETTERGB (255, 250, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
73 {"OldLace" , PALETTERGB (253, 245, 230) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
74 {"linen" , PALETTERGB (250, 240, 230) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
75 {"AntiqueWhite" , PALETTERGB (250, 235, 215) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
76 {"PapayaWhip" , PALETTERGB (255, 239, 213) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
77 {"BlanchedAlmond" , PALETTERGB (255, 235, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
78 {"bisque" , PALETTERGB (255, 228, 196) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
79 {"PeachPuff" , PALETTERGB (255, 218, 185) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
80 {"NavajoWhite" , PALETTERGB (255, 222, 173) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
81 {"moccasin" , PALETTERGB (255, 228, 181) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
82 {"cornsilk" , PALETTERGB (255, 248, 220) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
83 {"ivory" , PALETTERGB (255, 255, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
84 {"LemonChiffon" , PALETTERGB (255, 250, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
85 {"seashell" , PALETTERGB (255, 245, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
86 {"honeydew" , PALETTERGB (240, 255, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
87 {"MintCream" , PALETTERGB (245, 255, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
88 {"azure" , PALETTERGB (240, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
89 {"AliceBlue" , PALETTERGB (240, 248, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
90 {"lavender" , PALETTERGB (230, 230, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
91 {"LavenderBlush" , PALETTERGB (255, 240, 245) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
92 {"MistyRose" , PALETTERGB (255, 228, 225) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
93 {"white" , PALETTERGB (255, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
94 {"black" , PALETTERGB (0, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
95 {"DarkSlateGray" , PALETTERGB (47, 79, 79) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
96 {"DarkSlateGrey" , PALETTERGB (47, 79, 79) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
97 {"DimGray" , PALETTERGB (105, 105, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
98 {"DimGrey" , PALETTERGB (105, 105, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
99 {"SlateGray" , PALETTERGB (112, 128, 144) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
100 {"SlateGrey" , PALETTERGB (112, 128, 144) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
101 {"LightSlateGray" , PALETTERGB (119, 136, 153) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
102 {"LightSlateGrey" , PALETTERGB (119, 136, 153) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
103 {"gray" , PALETTERGB (190, 190, 190) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
104 {"grey" , PALETTERGB (190, 190, 190) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
105 {"LightGrey" , PALETTERGB (211, 211, 211) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
106 {"LightGray" , PALETTERGB (211, 211, 211) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
107 {"MidnightBlue" , PALETTERGB (25, 25, 112) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
108 {"navy" , PALETTERGB (0, 0, 128) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
109 {"NavyBlue" , PALETTERGB (0, 0, 128) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
110 {"CornflowerBlue" , PALETTERGB (100, 149, 237) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
111 {"DarkSlateBlue" , PALETTERGB (72, 61, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
112 {"SlateBlue" , PALETTERGB (106, 90, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
113 {"MediumSlateBlue" , PALETTERGB (123, 104, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
114 {"LightSlateBlue" , PALETTERGB (132, 112, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
115 {"MediumBlue" , PALETTERGB (0, 0, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
116 {"RoyalBlue" , PALETTERGB (65, 105, 225) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
117 {"blue" , PALETTERGB (0, 0, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
118 {"DodgerBlue" , PALETTERGB (30, 144, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
119 {"DeepSkyBlue" , PALETTERGB (0, 191, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
120 {"SkyBlue" , PALETTERGB (135, 206, 235) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
121 {"LightSkyBlue" , PALETTERGB (135, 206, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
122 {"SteelBlue" , PALETTERGB (70, 130, 180) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
123 {"LightSteelBlue" , PALETTERGB (176, 196, 222) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
124 {"LightBlue" , PALETTERGB (173, 216, 230) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
125 {"PowderBlue" , PALETTERGB (176, 224, 230) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
126 {"PaleTurquoise" , PALETTERGB (175, 238, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
127 {"DarkTurquoise" , PALETTERGB (0, 206, 209) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
128 {"MediumTurquoise" , PALETTERGB (72, 209, 204) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
129 {"turquoise" , PALETTERGB (64, 224, 208) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
130 {"cyan" , PALETTERGB (0, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
131 {"LightCyan" , PALETTERGB (224, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
132 {"CadetBlue" , PALETTERGB (95, 158, 160) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
133 {"MediumAquamarine" , PALETTERGB (102, 205, 170) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
134 {"aquamarine" , PALETTERGB (127, 255, 212) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
135 {"DarkGreen" , PALETTERGB (0, 100, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
136 {"DarkOliveGreen" , PALETTERGB (85, 107, 47) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
137 {"DarkSeaGreen" , PALETTERGB (143, 188, 143) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
138 {"SeaGreen" , PALETTERGB (46, 139, 87) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
139 {"MediumSeaGreen" , PALETTERGB (60, 179, 113) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
140 {"LightSeaGreen" , PALETTERGB (32, 178, 170) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
141 {"PaleGreen" , PALETTERGB (152, 251, 152) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
142 {"SpringGreen" , PALETTERGB (0, 255, 127) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
143 {"LawnGreen" , PALETTERGB (124, 252, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
144 {"green" , PALETTERGB (0, 255, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
145 {"chartreuse" , PALETTERGB (127, 255, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
146 {"MediumSpringGreen" , PALETTERGB (0, 250, 154) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
147 {"GreenYellow" , PALETTERGB (173, 255, 47) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
148 {"LimeGreen" , PALETTERGB (50, 205, 50) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
149 {"YellowGreen" , PALETTERGB (154, 205, 50) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
150 {"ForestGreen" , PALETTERGB (34, 139, 34) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
151 {"OliveDrab" , PALETTERGB (107, 142, 35) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
152 {"DarkKhaki" , PALETTERGB (189, 183, 107) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
153 {"khaki" , PALETTERGB (240, 230, 140) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
154 {"PaleGoldenrod" , PALETTERGB (238, 232, 170) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
155 {"LightGoldenrodYellow" , PALETTERGB (250, 250, 210) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
156 {"LightYellow" , PALETTERGB (255, 255, 224) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
157 {"yellow" , PALETTERGB (255, 255, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
158 {"gold" , PALETTERGB (255, 215, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
159 {"LightGoldenrod" , PALETTERGB (238, 221, 130) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
160 {"goldenrod" , PALETTERGB (218, 165, 32) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
161 {"DarkGoldenrod" , PALETTERGB (184, 134, 11) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
162 {"RosyBrown" , PALETTERGB (188, 143, 143) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
163 {"IndianRed" , PALETTERGB (205, 92, 92) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
164 {"SaddleBrown" , PALETTERGB (139, 69, 19) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
165 {"sienna" , PALETTERGB (160, 82, 45) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
166 {"peru" , PALETTERGB (205, 133, 63) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
167 {"burlywood" , PALETTERGB (222, 184, 135) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
168 {"beige" , PALETTERGB (245, 245, 220) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
169 {"wheat" , PALETTERGB (245, 222, 179) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
170 {"SandyBrown" , PALETTERGB (244, 164, 96) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
171 {"tan" , PALETTERGB (210, 180, 140) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
172 {"chocolate" , PALETTERGB (210, 105, 30) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
173 {"firebrick" , PALETTERGB (178, 34, 34) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
174 {"brown" , PALETTERGB (165, 42, 42) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
175 {"DarkSalmon" , PALETTERGB (233, 150, 122) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
176 {"salmon" , PALETTERGB (250, 128, 114) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
177 {"LightSalmon" , PALETTERGB (255, 160, 122) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
178 {"orange" , PALETTERGB (255, 165, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
179 {"DarkOrange" , PALETTERGB (255, 140, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
180 {"coral" , PALETTERGB (255, 127, 80) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
181 {"LightCoral" , PALETTERGB (240, 128, 128) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
182 {"tomato" , PALETTERGB (255, 99, 71) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
183 {"OrangeRed" , PALETTERGB (255, 69, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
184 {"red" , PALETTERGB (255, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
185 {"HotPink" , PALETTERGB (255, 105, 180) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
186 {"DeepPink" , PALETTERGB (255, 20, 147) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
187 {"pink" , PALETTERGB (255, 192, 203) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
188 {"LightPink" , PALETTERGB (255, 182, 193) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
189 {"PaleVioletRed" , PALETTERGB (219, 112, 147) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
190 {"maroon" , PALETTERGB (176, 48, 96) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
191 {"MediumVioletRed" , PALETTERGB (199, 21, 133) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
192 {"VioletRed" , PALETTERGB (208, 32, 144) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
193 {"magenta" , PALETTERGB (255, 0, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
194 {"violet" , PALETTERGB (238, 130, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
195 {"plum" , PALETTERGB (221, 160, 221) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
196 {"orchid" , PALETTERGB (218, 112, 214) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
197 {"MediumOrchid" , PALETTERGB (186, 85, 211) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
198 {"DarkOrchid" , PALETTERGB (153, 50, 204) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
199 {"DarkViolet" , PALETTERGB (148, 0, 211) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
200 {"BlueViolet" , PALETTERGB (138, 43, 226) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
201 {"purple" , PALETTERGB (160, 32, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
202 {"MediumPurple" , PALETTERGB (147, 112, 219) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
203 {"thistle" , PALETTERGB (216, 191, 216) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
204 {"snow1" , PALETTERGB (255, 250, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
205 {"snow2" , PALETTERGB (238, 233, 233) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
206 {"snow3" , PALETTERGB (205, 201, 201) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
207 {"snow4" , PALETTERGB (139, 137, 137) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
208 {"seashell1" , PALETTERGB (255, 245, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
209 {"seashell2" , PALETTERGB (238, 229, 222) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
210 {"seashell3" , PALETTERGB (205, 197, 191) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
211 {"seashell4" , PALETTERGB (139, 134, 130) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
212 {"AntiqueWhite1" , PALETTERGB (255, 239, 219) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
213 {"AntiqueWhite2" , PALETTERGB (238, 223, 204) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
214 {"AntiqueWhite3" , PALETTERGB (205, 192, 176) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
215 {"AntiqueWhite4" , PALETTERGB (139, 131, 120) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
216 {"bisque1" , PALETTERGB (255, 228, 196) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
217 {"bisque2" , PALETTERGB (238, 213, 183) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
218 {"bisque3" , PALETTERGB (205, 183, 158) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
219 {"bisque4" , PALETTERGB (139, 125, 107) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
220 {"PeachPuff1" , PALETTERGB (255, 218, 185) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
221 {"PeachPuff2" , PALETTERGB (238, 203, 173) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
222 {"PeachPuff3" , PALETTERGB (205, 175, 149) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
223 {"PeachPuff4" , PALETTERGB (139, 119, 101) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
224 {"NavajoWhite1" , PALETTERGB (255, 222, 173) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
225 {"NavajoWhite2" , PALETTERGB (238, 207, 161) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
226 {"NavajoWhite3" , PALETTERGB (205, 179, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
227 {"NavajoWhite4" , PALETTERGB (139, 121, 94) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
228 {"LemonChiffon1" , PALETTERGB (255, 250, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
229 {"LemonChiffon2" , PALETTERGB (238, 233, 191) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
230 {"LemonChiffon3" , PALETTERGB (205, 201, 165) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
231 {"LemonChiffon4" , PALETTERGB (139, 137, 112) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
232 {"cornsilk1" , PALETTERGB (255, 248, 220) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
233 {"cornsilk2" , PALETTERGB (238, 232, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
234 {"cornsilk3" , PALETTERGB (205, 200, 177) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
235 {"cornsilk4" , PALETTERGB (139, 136, 120) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
236 {"ivory1" , PALETTERGB (255, 255, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
237 {"ivory2" , PALETTERGB (238, 238, 224) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
238 {"ivory3" , PALETTERGB (205, 205, 193) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
239 {"ivory4" , PALETTERGB (139, 139, 131) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
240 {"honeydew1" , PALETTERGB (240, 255, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
241 {"honeydew2" , PALETTERGB (224, 238, 224) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
242 {"honeydew3" , PALETTERGB (193, 205, 193) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
243 {"honeydew4" , PALETTERGB (131, 139, 131) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
244 {"LavenderBlush1" , PALETTERGB (255, 240, 245) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
245 {"LavenderBlush2" , PALETTERGB (238, 224, 229) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
246 {"LavenderBlush3" , PALETTERGB (205, 193, 197) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
247 {"LavenderBlush4" , PALETTERGB (139, 131, 134) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
248 {"MistyRose1" , PALETTERGB (255, 228, 225) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
249 {"MistyRose2" , PALETTERGB (238, 213, 210) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
250 {"MistyRose3" , PALETTERGB (205, 183, 181) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
251 {"MistyRose4" , PALETTERGB (139, 125, 123) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
252 {"azure1" , PALETTERGB (240, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
253 {"azure2" , PALETTERGB (224, 238, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
254 {"azure3" , PALETTERGB (193, 205, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
255 {"azure4" , PALETTERGB (131, 139, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
256 {"SlateBlue1" , PALETTERGB (131, 111, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
257 {"SlateBlue2" , PALETTERGB (122, 103, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
258 {"SlateBlue3" , PALETTERGB (105, 89, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
259 {"SlateBlue4" , PALETTERGB (71, 60, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
260 {"RoyalBlue1" , PALETTERGB (72, 118, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
261 {"RoyalBlue2" , PALETTERGB (67, 110, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
262 {"RoyalBlue3" , PALETTERGB (58, 95, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
263 {"RoyalBlue4" , PALETTERGB (39, 64, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
264 {"blue1" , PALETTERGB (0, 0, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
265 {"blue2" , PALETTERGB (0, 0, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
266 {"blue3" , PALETTERGB (0, 0, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
267 {"blue4" , PALETTERGB (0, 0, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
268 {"DodgerBlue1" , PALETTERGB (30, 144, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
269 {"DodgerBlue2" , PALETTERGB (28, 134, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
270 {"DodgerBlue3" , PALETTERGB (24, 116, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
271 {"DodgerBlue4" , PALETTERGB (16, 78, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
272 {"SteelBlue1" , PALETTERGB (99, 184, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
273 {"SteelBlue2" , PALETTERGB (92, 172, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
274 {"SteelBlue3" , PALETTERGB (79, 148, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
275 {"SteelBlue4" , PALETTERGB (54, 100, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
276 {"DeepSkyBlue1" , PALETTERGB (0, 191, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
277 {"DeepSkyBlue2" , PALETTERGB (0, 178, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
278 {"DeepSkyBlue3" , PALETTERGB (0, 154, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
279 {"DeepSkyBlue4" , PALETTERGB (0, 104, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
280 {"SkyBlue1" , PALETTERGB (135, 206, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
281 {"SkyBlue2" , PALETTERGB (126, 192, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
282 {"SkyBlue3" , PALETTERGB (108, 166, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
283 {"SkyBlue4" , PALETTERGB (74, 112, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
284 {"LightSkyBlue1" , PALETTERGB (176, 226, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
285 {"LightSkyBlue2" , PALETTERGB (164, 211, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
286 {"LightSkyBlue3" , PALETTERGB (141, 182, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
287 {"LightSkyBlue4" , PALETTERGB (96, 123, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
288 {"SlateGray1" , PALETTERGB (198, 226, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
289 {"SlateGray2" , PALETTERGB (185, 211, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
290 {"SlateGray3" , PALETTERGB (159, 182, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
291 {"SlateGray4" , PALETTERGB (108, 123, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
292 {"LightSteelBlue1" , PALETTERGB (202, 225, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
293 {"LightSteelBlue2" , PALETTERGB (188, 210, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
294 {"LightSteelBlue3" , PALETTERGB (162, 181, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
295 {"LightSteelBlue4" , PALETTERGB (110, 123, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
296 {"LightBlue1" , PALETTERGB (191, 239, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
297 {"LightBlue2" , PALETTERGB (178, 223, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
298 {"LightBlue3" , PALETTERGB (154, 192, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
299 {"LightBlue4" , PALETTERGB (104, 131, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
300 {"LightCyan1" , PALETTERGB (224, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
301 {"LightCyan2" , PALETTERGB (209, 238, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
302 {"LightCyan3" , PALETTERGB (180, 205, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
303 {"LightCyan4" , PALETTERGB (122, 139, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
304 {"PaleTurquoise1" , PALETTERGB (187, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
305 {"PaleTurquoise2" , PALETTERGB (174, 238, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
306 {"PaleTurquoise3" , PALETTERGB (150, 205, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
307 {"PaleTurquoise4" , PALETTERGB (102, 139, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
308 {"CadetBlue1" , PALETTERGB (152, 245, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
309 {"CadetBlue2" , PALETTERGB (142, 229, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
310 {"CadetBlue3" , PALETTERGB (122, 197, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
311 {"CadetBlue4" , PALETTERGB (83, 134, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
312 {"turquoise1" , PALETTERGB (0, 245, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
313 {"turquoise2" , PALETTERGB (0, 229, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
314 {"turquoise3" , PALETTERGB (0, 197, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
315 {"turquoise4" , PALETTERGB (0, 134, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
316 {"cyan1" , PALETTERGB (0, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
317 {"cyan2" , PALETTERGB (0, 238, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
318 {"cyan3" , PALETTERGB (0, 205, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
319 {"cyan4" , PALETTERGB (0, 139, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
320 {"DarkSlateGray1" , PALETTERGB (151, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
321 {"DarkSlateGray2" , PALETTERGB (141, 238, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
322 {"DarkSlateGray3" , PALETTERGB (121, 205, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
323 {"DarkSlateGray4" , PALETTERGB (82, 139, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
324 {"aquamarine1" , PALETTERGB (127, 255, 212) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
325 {"aquamarine2" , PALETTERGB (118, 238, 198) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
326 {"aquamarine3" , PALETTERGB (102, 205, 170) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
327 {"aquamarine4" , PALETTERGB (69, 139, 116) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
328 {"DarkSeaGreen1" , PALETTERGB (193, 255, 193) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
329 {"DarkSeaGreen2" , PALETTERGB (180, 238, 180) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
330 {"DarkSeaGreen3" , PALETTERGB (155, 205, 155) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
331 {"DarkSeaGreen4" , PALETTERGB (105, 139, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
332 {"SeaGreen1" , PALETTERGB (84, 255, 159) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
333 {"SeaGreen2" , PALETTERGB (78, 238, 148) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
334 {"SeaGreen3" , PALETTERGB (67, 205, 128) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
335 {"SeaGreen4" , PALETTERGB (46, 139, 87) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
336 {"PaleGreen1" , PALETTERGB (154, 255, 154) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
337 {"PaleGreen2" , PALETTERGB (144, 238, 144) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
338 {"PaleGreen3" , PALETTERGB (124, 205, 124) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
339 {"PaleGreen4" , PALETTERGB (84, 139, 84) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
340 {"SpringGreen1" , PALETTERGB (0, 255, 127) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
341 {"SpringGreen2" , PALETTERGB (0, 238, 118) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
342 {"SpringGreen3" , PALETTERGB (0, 205, 102) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
343 {"SpringGreen4" , PALETTERGB (0, 139, 69) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
344 {"green1" , PALETTERGB (0, 255, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
345 {"green2" , PALETTERGB (0, 238, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
346 {"green3" , PALETTERGB (0, 205, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
347 {"green4" , PALETTERGB (0, 139, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
348 {"chartreuse1" , PALETTERGB (127, 255, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
349 {"chartreuse2" , PALETTERGB (118, 238, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
350 {"chartreuse3" , PALETTERGB (102, 205, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
351 {"chartreuse4" , PALETTERGB (69, 139, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
352 {"OliveDrab1" , PALETTERGB (192, 255, 62) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
353 {"OliveDrab2" , PALETTERGB (179, 238, 58) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
354 {"OliveDrab3" , PALETTERGB (154, 205, 50) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
355 {"OliveDrab4" , PALETTERGB (105, 139, 34) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
356 {"DarkOliveGreen1" , PALETTERGB (202, 255, 112) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
357 {"DarkOliveGreen2" , PALETTERGB (188, 238, 104) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
358 {"DarkOliveGreen3" , PALETTERGB (162, 205, 90) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
359 {"DarkOliveGreen4" , PALETTERGB (110, 139, 61) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
360 {"khaki1" , PALETTERGB (255, 246, 143) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
361 {"khaki2" , PALETTERGB (238, 230, 133) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
362 {"khaki3" , PALETTERGB (205, 198, 115) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
363 {"khaki4" , PALETTERGB (139, 134, 78) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
364 {"LightGoldenrod1" , PALETTERGB (255, 236, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
365 {"LightGoldenrod2" , PALETTERGB (238, 220, 130) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
366 {"LightGoldenrod3" , PALETTERGB (205, 190, 112) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
367 {"LightGoldenrod4" , PALETTERGB (139, 129, 76) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
368 {"LightYellow1" , PALETTERGB (255, 255, 224) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
369 {"LightYellow2" , PALETTERGB (238, 238, 209) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
370 {"LightYellow3" , PALETTERGB (205, 205, 180) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
371 {"LightYellow4" , PALETTERGB (139, 139, 122) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
372 {"yellow1" , PALETTERGB (255, 255, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
373 {"yellow2" , PALETTERGB (238, 238, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
374 {"yellow3" , PALETTERGB (205, 205, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
375 {"yellow4" , PALETTERGB (139, 139, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
376 {"gold1" , PALETTERGB (255, 215, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
377 {"gold2" , PALETTERGB (238, 201, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
378 {"gold3" , PALETTERGB (205, 173, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
379 {"gold4" , PALETTERGB (139, 117, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
380 {"goldenrod1" , PALETTERGB (255, 193, 37) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
381 {"goldenrod2" , PALETTERGB (238, 180, 34) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
382 {"goldenrod3" , PALETTERGB (205, 155, 29) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
383 {"goldenrod4" , PALETTERGB (139, 105, 20) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
384 {"DarkGoldenrod1" , PALETTERGB (255, 185, 15) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
385 {"DarkGoldenrod2" , PALETTERGB (238, 173, 14) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
386 {"DarkGoldenrod3" , PALETTERGB (205, 149, 12) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
387 {"DarkGoldenrod4" , PALETTERGB (139, 101, 8) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
388 {"RosyBrown1" , PALETTERGB (255, 193, 193) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
389 {"RosyBrown2" , PALETTERGB (238, 180, 180) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
390 {"RosyBrown3" , PALETTERGB (205, 155, 155) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
391 {"RosyBrown4" , PALETTERGB (139, 105, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
392 {"IndianRed1" , PALETTERGB (255, 106, 106) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
393 {"IndianRed2" , PALETTERGB (238, 99, 99) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
394 {"IndianRed3" , PALETTERGB (205, 85, 85) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
395 {"IndianRed4" , PALETTERGB (139, 58, 58) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
396 {"sienna1" , PALETTERGB (255, 130, 71) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
397 {"sienna2" , PALETTERGB (238, 121, 66) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
398 {"sienna3" , PALETTERGB (205, 104, 57) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
399 {"sienna4" , PALETTERGB (139, 71, 38) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
400 {"burlywood1" , PALETTERGB (255, 211, 155) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
401 {"burlywood2" , PALETTERGB (238, 197, 145) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
402 {"burlywood3" , PALETTERGB (205, 170, 125) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
403 {"burlywood4" , PALETTERGB (139, 115, 85) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
404 {"wheat1" , PALETTERGB (255, 231, 186) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
405 {"wheat2" , PALETTERGB (238, 216, 174) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
406 {"wheat3" , PALETTERGB (205, 186, 150) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
407 {"wheat4" , PALETTERGB (139, 126, 102) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
408 {"tan1" , PALETTERGB (255, 165, 79) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
409 {"tan2" , PALETTERGB (238, 154, 73) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
410 {"tan3" , PALETTERGB (205, 133, 63) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
411 {"tan4" , PALETTERGB (139, 90, 43) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
412 {"chocolate1" , PALETTERGB (255, 127, 36) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
413 {"chocolate2" , PALETTERGB (238, 118, 33) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
414 {"chocolate3" , PALETTERGB (205, 102, 29) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
415 {"chocolate4" , PALETTERGB (139, 69, 19) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
416 {"firebrick1" , PALETTERGB (255, 48, 48) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
417 {"firebrick2" , PALETTERGB (238, 44, 44) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
418 {"firebrick3" , PALETTERGB (205, 38, 38) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
419 {"firebrick4" , PALETTERGB (139, 26, 26) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
420 {"brown1" , PALETTERGB (255, 64, 64) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
421 {"brown2" , PALETTERGB (238, 59, 59) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
422 {"brown3" , PALETTERGB (205, 51, 51) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
423 {"brown4" , PALETTERGB (139, 35, 35) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
424 {"salmon1" , PALETTERGB (255, 140, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
425 {"salmon2" , PALETTERGB (238, 130, 98) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
426 {"salmon3" , PALETTERGB (205, 112, 84) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
427 {"salmon4" , PALETTERGB (139, 76, 57) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
428 {"LightSalmon1" , PALETTERGB (255, 160, 122) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
429 {"LightSalmon2" , PALETTERGB (238, 149, 114) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
430 {"LightSalmon3" , PALETTERGB (205, 129, 98) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
431 {"LightSalmon4" , PALETTERGB (139, 87, 66) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
432 {"orange1" , PALETTERGB (255, 165, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
433 {"orange2" , PALETTERGB (238, 154, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
434 {"orange3" , PALETTERGB (205, 133, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
435 {"orange4" , PALETTERGB (139, 90, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
436 {"DarkOrange1" , PALETTERGB (255, 127, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
437 {"DarkOrange2" , PALETTERGB (238, 118, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
438 {"DarkOrange3" , PALETTERGB (205, 102, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
439 {"DarkOrange4" , PALETTERGB (139, 69, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
440 {"coral1" , PALETTERGB (255, 114, 86) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
441 {"coral2" , PALETTERGB (238, 106, 80) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
442 {"coral3" , PALETTERGB (205, 91, 69) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
443 {"coral4" , PALETTERGB (139, 62, 47) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
444 {"tomato1" , PALETTERGB (255, 99, 71) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
445 {"tomato2" , PALETTERGB (238, 92, 66) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
446 {"tomato3" , PALETTERGB (205, 79, 57) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
447 {"tomato4" , PALETTERGB (139, 54, 38) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
448 {"OrangeRed1" , PALETTERGB (255, 69, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
449 {"OrangeRed2" , PALETTERGB (238, 64, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
450 {"OrangeRed3" , PALETTERGB (205, 55, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
451 {"OrangeRed4" , PALETTERGB (139, 37, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
452 {"red1" , PALETTERGB (255, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
453 {"red2" , PALETTERGB (238, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
454 {"red3" , PALETTERGB (205, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
455 {"red4" , PALETTERGB (139, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
456 {"DeepPink1" , PALETTERGB (255, 20, 147) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
457 {"DeepPink2" , PALETTERGB (238, 18, 137) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
458 {"DeepPink3" , PALETTERGB (205, 16, 118) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
459 {"DeepPink4" , PALETTERGB (139, 10, 80) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
460 {"HotPink1" , PALETTERGB (255, 110, 180) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
461 {"HotPink2" , PALETTERGB (238, 106, 167) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
462 {"HotPink3" , PALETTERGB (205, 96, 144) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
463 {"HotPink4" , PALETTERGB (139, 58, 98) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
464 {"pink1" , PALETTERGB (255, 181, 197) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
465 {"pink2" , PALETTERGB (238, 169, 184) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
466 {"pink3" , PALETTERGB (205, 145, 158) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
467 {"pink4" , PALETTERGB (139, 99, 108) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
468 {"LightPink1" , PALETTERGB (255, 174, 185) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
469 {"LightPink2" , PALETTERGB (238, 162, 173) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
470 {"LightPink3" , PALETTERGB (205, 140, 149) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
471 {"LightPink4" , PALETTERGB (139, 95, 101) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
472 {"PaleVioletRed1" , PALETTERGB (255, 130, 171) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
473 {"PaleVioletRed2" , PALETTERGB (238, 121, 159) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
474 {"PaleVioletRed3" , PALETTERGB (205, 104, 137) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
475 {"PaleVioletRed4" , PALETTERGB (139, 71, 93) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
476 {"maroon1" , PALETTERGB (255, 52, 179) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
477 {"maroon2" , PALETTERGB (238, 48, 167) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
478 {"maroon3" , PALETTERGB (205, 41, 144) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
479 {"maroon4" , PALETTERGB (139, 28, 98) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
480 {"VioletRed1" , PALETTERGB (255, 62, 150) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
481 {"VioletRed2" , PALETTERGB (238, 58, 140) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
482 {"VioletRed3" , PALETTERGB (205, 50, 120) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
483 {"VioletRed4" , PALETTERGB (139, 34, 82) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
484 {"magenta1" , PALETTERGB (255, 0, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
485 {"magenta2" , PALETTERGB (238, 0, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
486 {"magenta3" , PALETTERGB (205, 0, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
487 {"magenta4" , PALETTERGB (139, 0, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
488 {"orchid1" , PALETTERGB (255, 131, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
489 {"orchid2" , PALETTERGB (238, 122, 233) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
490 {"orchid3" , PALETTERGB (205, 105, 201) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
491 {"orchid4" , PALETTERGB (139, 71, 137) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
492 {"plum1" , PALETTERGB (255, 187, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
493 {"plum2" , PALETTERGB (238, 174, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
494 {"plum3" , PALETTERGB (205, 150, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
495 {"plum4" , PALETTERGB (139, 102, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
496 {"MediumOrchid1" , PALETTERGB (224, 102, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
497 {"MediumOrchid2" , PALETTERGB (209, 95, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
498 {"MediumOrchid3" , PALETTERGB (180, 82, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
499 {"MediumOrchid4" , PALETTERGB (122, 55, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
500 {"DarkOrchid1" , PALETTERGB (191, 62, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
501 {"DarkOrchid2" , PALETTERGB (178, 58, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
502 {"DarkOrchid3" , PALETTERGB (154, 50, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
503 {"DarkOrchid4" , PALETTERGB (104, 34, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
504 {"purple1" , PALETTERGB (155, 48, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
505 {"purple2" , PALETTERGB (145, 44, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
506 {"purple3" , PALETTERGB (125, 38, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
507 {"purple4" , PALETTERGB (85, 26, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
508 {"MediumPurple1" , PALETTERGB (171, 130, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
509 {"MediumPurple2" , PALETTERGB (159, 121, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
510 {"MediumPurple3" , PALETTERGB (137, 104, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
511 {"MediumPurple4" , PALETTERGB (93, 71, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
512 {"thistle1" , PALETTERGB (255, 225, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
513 {"thistle2" , PALETTERGB (238, 210, 238) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
514 {"thistle3" , PALETTERGB (205, 181, 205) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
515 {"thistle4" , PALETTERGB (139, 123, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
516 {"gray0" , PALETTERGB (0, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
517 {"grey0" , PALETTERGB (0, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
518 {"gray1" , PALETTERGB (3, 3, 3) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
519 {"grey1" , PALETTERGB (3, 3, 3) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
520 {"gray2" , PALETTERGB (5, 5, 5) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
521 {"grey2" , PALETTERGB (5, 5, 5) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
522 {"gray3" , PALETTERGB (8, 8, 8) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
523 {"grey3" , PALETTERGB (8, 8, 8) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
524 {"gray4" , PALETTERGB (10, 10, 10) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
525 {"grey4" , PALETTERGB (10, 10, 10) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
526 {"gray5" , PALETTERGB (13, 13, 13) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
527 {"grey5" , PALETTERGB (13, 13, 13) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
528 {"gray6" , PALETTERGB (15, 15, 15) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
529 {"grey6" , PALETTERGB (15, 15, 15) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
530 {"gray7" , PALETTERGB (18, 18, 18) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
531 {"grey7" , PALETTERGB (18, 18, 18) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
532 {"gray8" , PALETTERGB (20, 20, 20) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
533 {"grey8" , PALETTERGB (20, 20, 20) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
534 {"gray9" , PALETTERGB (23, 23, 23) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
535 {"grey9" , PALETTERGB (23, 23, 23) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
536 {"gray10" , PALETTERGB (26, 26, 26) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
537 {"grey10" , PALETTERGB (26, 26, 26) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
538 {"gray11" , PALETTERGB (28, 28, 28) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
539 {"grey11" , PALETTERGB (28, 28, 28) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
540 {"gray12" , PALETTERGB (31, 31, 31) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
541 {"grey12" , PALETTERGB (31, 31, 31) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
542 {"gray13" , PALETTERGB (33, 33, 33) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
543 {"grey13" , PALETTERGB (33, 33, 33) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
544 {"gray14" , PALETTERGB (36, 36, 36) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
545 {"grey14" , PALETTERGB (36, 36, 36) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
546 {"gray15" , PALETTERGB (38, 38, 38) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
547 {"grey15" , PALETTERGB (38, 38, 38) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
548 {"gray16" , PALETTERGB (41, 41, 41) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
549 {"grey16" , PALETTERGB (41, 41, 41) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
550 {"gray17" , PALETTERGB (43, 43, 43) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
551 {"grey17" , PALETTERGB (43, 43, 43) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
552 {"gray18" , PALETTERGB (46, 46, 46) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
553 {"grey18" , PALETTERGB (46, 46, 46) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
554 {"gray19" , PALETTERGB (48, 48, 48) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
555 {"grey19" , PALETTERGB (48, 48, 48) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
556 {"gray20" , PALETTERGB (51, 51, 51) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
557 {"grey20" , PALETTERGB (51, 51, 51) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
558 {"gray21" , PALETTERGB (54, 54, 54) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
559 {"grey21" , PALETTERGB (54, 54, 54) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
560 {"gray22" , PALETTERGB (56, 56, 56) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
561 {"grey22" , PALETTERGB (56, 56, 56) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
562 {"gray23" , PALETTERGB (59, 59, 59) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
563 {"grey23" , PALETTERGB (59, 59, 59) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
564 {"gray24" , PALETTERGB (61, 61, 61) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
565 {"grey24" , PALETTERGB (61, 61, 61) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
566 {"gray25" , PALETTERGB (64, 64, 64) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
567 {"grey25" , PALETTERGB (64, 64, 64) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
568 {"gray26" , PALETTERGB (66, 66, 66) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
569 {"grey26" , PALETTERGB (66, 66, 66) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
570 {"gray27" , PALETTERGB (69, 69, 69) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
571 {"grey27" , PALETTERGB (69, 69, 69) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
572 {"gray28" , PALETTERGB (71, 71, 71) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
573 {"grey28" , PALETTERGB (71, 71, 71) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
574 {"gray29" , PALETTERGB (74, 74, 74) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
575 {"grey29" , PALETTERGB (74, 74, 74) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
576 {"gray30" , PALETTERGB (77, 77, 77) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
577 {"grey30" , PALETTERGB (77, 77, 77) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
578 {"gray31" , PALETTERGB (79, 79, 79) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
579 {"grey31" , PALETTERGB (79, 79, 79) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
580 {"gray32" , PALETTERGB (82, 82, 82) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
581 {"grey32" , PALETTERGB (82, 82, 82) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
582 {"gray33" , PALETTERGB (84, 84, 84) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
583 {"grey33" , PALETTERGB (84, 84, 84) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
584 {"gray34" , PALETTERGB (87, 87, 87) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
585 {"grey34" , PALETTERGB (87, 87, 87) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
586 {"gray35" , PALETTERGB (89, 89, 89) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
587 {"grey35" , PALETTERGB (89, 89, 89) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
588 {"gray36" , PALETTERGB (92, 92, 92) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
589 {"grey36" , PALETTERGB (92, 92, 92) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
590 {"gray37" , PALETTERGB (94, 94, 94) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
591 {"grey37" , PALETTERGB (94, 94, 94) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
592 {"gray38" , PALETTERGB (97, 97, 97) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
593 {"grey38" , PALETTERGB (97, 97, 97) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
594 {"gray39" , PALETTERGB (99, 99, 99) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
595 {"grey39" , PALETTERGB (99, 99, 99) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
596 {"gray40" , PALETTERGB (102, 102, 102) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
597 {"grey40" , PALETTERGB (102, 102, 102) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
598 {"gray41" , PALETTERGB (105, 105, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
599 {"grey41" , PALETTERGB (105, 105, 105) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
600 {"gray42" , PALETTERGB (107, 107, 107) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
601 {"grey42" , PALETTERGB (107, 107, 107) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
602 {"gray43" , PALETTERGB (110, 110, 110) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
603 {"grey43" , PALETTERGB (110, 110, 110) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
604 {"gray44" , PALETTERGB (112, 112, 112) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
605 {"grey44" , PALETTERGB (112, 112, 112) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
606 {"gray45" , PALETTERGB (115, 115, 115) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
607 {"grey45" , PALETTERGB (115, 115, 115) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
608 {"gray46" , PALETTERGB (117, 117, 117) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
609 {"grey46" , PALETTERGB (117, 117, 117) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
610 {"gray47" , PALETTERGB (120, 120, 120) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
611 {"grey47" , PALETTERGB (120, 120, 120) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
612 {"gray48" , PALETTERGB (122, 122, 122) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
613 {"grey48" , PALETTERGB (122, 122, 122) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
614 {"gray49" , PALETTERGB (125, 125, 125) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
615 {"grey49" , PALETTERGB (125, 125, 125) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
616 {"gray50" , PALETTERGB (127, 127, 127) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
617 {"grey50" , PALETTERGB (127, 127, 127) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
618 {"gray51" , PALETTERGB (130, 130, 130) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
619 {"grey51" , PALETTERGB (130, 130, 130) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
620 {"gray52" , PALETTERGB (133, 133, 133) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
621 {"grey52" , PALETTERGB (133, 133, 133) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
622 {"gray53" , PALETTERGB (135, 135, 135) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
623 {"grey53" , PALETTERGB (135, 135, 135) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
624 {"gray54" , PALETTERGB (138, 138, 138) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
625 {"grey54" , PALETTERGB (138, 138, 138) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
626 {"gray55" , PALETTERGB (140, 140, 140) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
627 {"grey55" , PALETTERGB (140, 140, 140) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
628 {"gray56" , PALETTERGB (143, 143, 143) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
629 {"grey56" , PALETTERGB (143, 143, 143) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
630 {"gray57" , PALETTERGB (145, 145, 145) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
631 {"grey57" , PALETTERGB (145, 145, 145) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
632 {"gray58" , PALETTERGB (148, 148, 148) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
633 {"grey58" , PALETTERGB (148, 148, 148) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
634 {"gray59" , PALETTERGB (150, 150, 150) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
635 {"grey59" , PALETTERGB (150, 150, 150) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
636 {"gray60" , PALETTERGB (153, 153, 153) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
637 {"grey60" , PALETTERGB (153, 153, 153) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
638 {"gray61" , PALETTERGB (156, 156, 156) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
639 {"grey61" , PALETTERGB (156, 156, 156) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
640 {"gray62" , PALETTERGB (158, 158, 158) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
641 {"grey62" , PALETTERGB (158, 158, 158) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
642 {"gray63" , PALETTERGB (161, 161, 161) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
643 {"grey63" , PALETTERGB (161, 161, 161) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
644 {"gray64" , PALETTERGB (163, 163, 163) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
645 {"grey64" , PALETTERGB (163, 163, 163) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
646 {"gray65" , PALETTERGB (166, 166, 166) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
647 {"grey65" , PALETTERGB (166, 166, 166) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
648 {"gray66" , PALETTERGB (168, 168, 168) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
649 {"grey66" , PALETTERGB (168, 168, 168) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
650 {"gray67" , PALETTERGB (171, 171, 171) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
651 {"grey67" , PALETTERGB (171, 171, 171) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
652 {"gray68" , PALETTERGB (173, 173, 173) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
653 {"grey68" , PALETTERGB (173, 173, 173) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
654 {"gray69" , PALETTERGB (176, 176, 176) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
655 {"grey69" , PALETTERGB (176, 176, 176) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
656 {"gray70" , PALETTERGB (179, 179, 179) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
657 {"grey70" , PALETTERGB (179, 179, 179) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
658 {"gray71" , PALETTERGB (181, 181, 181) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
659 {"grey71" , PALETTERGB (181, 181, 181) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
660 {"gray72" , PALETTERGB (184, 184, 184) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
661 {"grey72" , PALETTERGB (184, 184, 184) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
662 {"gray73" , PALETTERGB (186, 186, 186) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
663 {"grey73" , PALETTERGB (186, 186, 186) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
664 {"gray74" , PALETTERGB (189, 189, 189) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
665 {"grey74" , PALETTERGB (189, 189, 189) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
666 {"gray75" , PALETTERGB (191, 191, 191) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
667 {"grey75" , PALETTERGB (191, 191, 191) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
668 {"gray76" , PALETTERGB (194, 194, 194) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
669 {"grey76" , PALETTERGB (194, 194, 194) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
670 {"gray77" , PALETTERGB (196, 196, 196) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
671 {"grey77" , PALETTERGB (196, 196, 196) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
672 {"gray78" , PALETTERGB (199, 199, 199) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
673 {"grey78" , PALETTERGB (199, 199, 199) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
674 {"gray79" , PALETTERGB (201, 201, 201) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
675 {"grey79" , PALETTERGB (201, 201, 201) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
676 {"gray80" , PALETTERGB (204, 204, 204) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
677 {"grey80" , PALETTERGB (204, 204, 204) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
678 {"gray81" , PALETTERGB (207, 207, 207) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
679 {"grey81" , PALETTERGB (207, 207, 207) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
680 {"gray82" , PALETTERGB (209, 209, 209) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
681 {"grey82" , PALETTERGB (209, 209, 209) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
682 {"gray83" , PALETTERGB (212, 212, 212) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
683 {"grey83" , PALETTERGB (212, 212, 212) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
684 {"gray84" , PALETTERGB (214, 214, 214) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
685 {"grey84" , PALETTERGB (214, 214, 214) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
686 {"gray85" , PALETTERGB (217, 217, 217) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
687 {"grey85" , PALETTERGB (217, 217, 217) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
688 {"gray86" , PALETTERGB (219, 219, 219) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
689 {"grey86" , PALETTERGB (219, 219, 219) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
690 {"gray87" , PALETTERGB (222, 222, 222) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
691 {"grey87" , PALETTERGB (222, 222, 222) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
692 {"gray88" , PALETTERGB (224, 224, 224) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
693 {"grey88" , PALETTERGB (224, 224, 224) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
694 {"gray89" , PALETTERGB (227, 227, 227) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
695 {"grey89" , PALETTERGB (227, 227, 227) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
696 {"gray90" , PALETTERGB (229, 229, 229) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
697 {"grey90" , PALETTERGB (229, 229, 229) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
698 {"gray91" , PALETTERGB (232, 232, 232) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
699 {"grey91" , PALETTERGB (232, 232, 232) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
700 {"gray92" , PALETTERGB (235, 235, 235) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
701 {"grey92" , PALETTERGB (235, 235, 235) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
702 {"gray93" , PALETTERGB (237, 237, 237) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
703 {"grey93" , PALETTERGB (237, 237, 237) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
704 {"gray94" , PALETTERGB (240, 240, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
705 {"grey94" , PALETTERGB (240, 240, 240) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
706 {"gray95" , PALETTERGB (242, 242, 242) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
707 {"grey95" , PALETTERGB (242, 242, 242) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
708 {"gray96" , PALETTERGB (245, 245, 245) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
709 {"grey96" , PALETTERGB (245, 245, 245) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
710 {"gray97" , PALETTERGB (247, 247, 247) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
711 {"grey97" , PALETTERGB (247, 247, 247) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
712 {"gray98" , PALETTERGB (250, 250, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
713 {"grey98" , PALETTERGB (250, 250, 250) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
714 {"gray99" , PALETTERGB (252, 252, 252) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
715 {"grey99" , PALETTERGB (252, 252, 252) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
716 {"gray100" , PALETTERGB (255, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
717 {"grey100" , PALETTERGB (255, 255, 255) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
718 {"DarkGrey" , PALETTERGB (169, 169, 169) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
719 {"DarkGray" , PALETTERGB (169, 169, 169) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
720 {"DarkBlue" , PALETTERGB (0, 0, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
721 {"DarkCyan" , PALETTERGB (0, 139, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
722 {"DarkMagenta" , PALETTERGB (139, 0, 139) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
723 {"DarkRed" , PALETTERGB (139, 0, 0) },
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
724 {"LightGreen" , PALETTERGB (144, 238, 144) }
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
725 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
726
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
727
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
728 typedef struct fontmap_t
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
729 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
730 const char *name;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
731 const int value;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
732 } fontmap_t;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
733
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
734 /* Default weight first, preferred names listed before synonyms */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
735 static const fontmap_t fontweight_map[] =
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
736 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
737 {"Regular" , FW_REGULAR}, /* The standard font weight */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
738 {"Thin" , FW_THIN},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
739 {"Extra Light" , FW_EXTRALIGHT},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
740 {"Ultra Light" , FW_ULTRALIGHT},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
741 {"Light" , FW_LIGHT},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
742 {"Normal" , FW_NORMAL},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
743 {"Medium" , FW_MEDIUM},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
744 {"Semi Bold" , FW_SEMIBOLD},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
745 {"Demi Bold" , FW_DEMIBOLD},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
746 {"Bold" , FW_BOLD}, /* The standard bold font weight */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
747 {"Extra Bold" , FW_EXTRABOLD},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
748 {"Ultra Bold" , FW_ULTRABOLD},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
749 {"Heavy" , FW_HEAVY},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
750 {"Black" , FW_BLACK}
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
751 };
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
752
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
753 /* Default charset first, no synonyms allowed because these names are
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
754 * matched against the names reported by win32 by match_font() */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
755 static const fontmap_t charset_map[] =
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
756 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
757 {"Western" , ANSI_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
758 {"Symbol" , SYMBOL_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
759 {"Shift JIS" , SHIFTJIS_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
760 {"GB2312" , GB2312_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
761 {"Hanguel" , HANGEUL_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
762 {"Chinese Big 5" , CHINESEBIG5_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
763 #if (WINVER >= 0x0400)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
764 {"Johab" , JOHAB_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
765 {"Hebrew" , HEBREW_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
766 {"Arabic" , ARABIC_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
767 {"Greek" , GREEK_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
768 {"Turkish" , TURKISH_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
769 {"Vietnamese" , VIETNAMESE_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
770 {"Thai" , THAI_CHARSET}, /* #### Name to be verified */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
771 {"Central European" , EASTEUROPE_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
772 {"Cyrillic" , RUSSIAN_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
773 {"Mac" , MAC_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
774 {"Baltic" , BALTIC_CHARSET},
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
775 #endif
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
776 {"OEM/DOS" , OEM_CHARSET}
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
777 };
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
778
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
779
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
780 /************************************************************************/
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
781 /* helpers */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
782 /************************************************************************/
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
783
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
784 static int
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
785 hexval (char c)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
786 {
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
787 /* assumes ASCII and isxdigit(c) */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
788 if (c >= 'a')
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
789 return c-'a' + 10;
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
790 else if (c >= 'A')
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
791 return c-'A' + 10;
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
792 else
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
793 return c-'0';
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
794 }
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
795
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
796 COLORREF
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
797 mswindows_string_to_color(const char *name)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
798 {
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
799 int i;
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
800
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
801 if (*name == '#')
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
802 {
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
803 /* numeric names look like "#RRGGBB", "#RRRGGGBBB" or "#RRRRGGGGBBBB"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
804 or "rgb:rrrr/gggg/bbbb" */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
805 unsigned int r, g, b;
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
806
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
807 for (i=1; i<strlen(name); i++)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
808 {
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
809 if (!isxdigit ((int)name[i]))
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
810 return (COLORREF) -1;
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
811 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
812 if (strlen(name)==7)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
813 {
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
814 r = hexval (name[1]) * 16 + hexval (name[2]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
815 g = hexval (name[3]) * 16 + hexval (name[4]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
816 b = hexval (name[5]) * 16 + hexval (name[6]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
817 return (PALETTERGB (r, g, b));
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
818 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
819 else if (strlen(name)==10)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
820 {
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
821 r = hexval (name[1]) * 16 + hexval (name[2]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
822 g = hexval (name[4]) * 16 + hexval (name[5]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
823 b = hexval (name[7]) * 16 + hexval (name[8]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
824 return (PALETTERGB (r, g, b));
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
825 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
826 else if (strlen(name)==13)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
827 {
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
828 r = hexval (name[1]) * 16 + hexval (name[2]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
829 g = hexval (name[5]) * 16 + hexval (name[6]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
830 b = hexval (name[9]) * 16 + hexval (name[10]);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
831 return (PALETTERGB (r, g, b));
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
832 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
833 }
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
834 else if (!strncmp(name, "rgb:", 4))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
835 {
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
836 unsigned int r,g,b;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
837
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
838 if (sscanf(name, "rgb:%04x/%04x/%04x", &r, &g, &b) == 3)
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
839 {
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
840 int len = strlen (name);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
841 if (len == 18)
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
842 {
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
843 r /= 257;
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
844 g /= 257;
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
845 b /= 257;
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
846 }
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
847 else if (len == 15)
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
848 {
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
849 r /= 17;
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
850 g /= 17;
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
851 b /= 17;
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
852 }
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
853 return (PALETTERGB (r, g, b));
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
854 }
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
855 else
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
856 return (COLORREF) -1;
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
857 }
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
858 else if (*name) /* Can't be an empty string */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
859 {
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
860 char *nospaces = alloca (strlen (name)+1);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
861 char *c=nospaces;
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
862 while (*name)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
863 if (*name != ' ')
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
864 *(c++) = *(name++);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
865 else
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
866 name++;
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
867 *c = '\0';
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
868
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
869 for (i=0; i< countof (mswindows_X_color_map); i++)
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
870 if (!stricmp (nospaces, mswindows_X_color_map[i].name))
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
871 return (mswindows_X_color_map[i].colorref);
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
872 }
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
873 return (COLORREF) -1;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
874 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
875
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
876 /*
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
877 * Returns non-zero if the two supplied font patterns match.
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
878 * If they match and fontname is not NULL, copies the logical OR of the
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
879 * patterns to fontname (which is assumed to be at least MSW_FONTSIZE in size).
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
880 *
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
881 * The patterns 'match' iff for each field that is not blank in either pattern,
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
882 * the corresponding field in the other pattern is either identical or blank.
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
883 */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
884 static int
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
885 match_font (char *pattern1, char *pattern2, char *fontname)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
886 {
296
5a79be0ef6a8 Import from CVS: tag r21-0b46
cvs
parents: 294
diff changeset
887 char *c1=pattern1, *c2=pattern2, *e1=0, *e2=0;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
888 int i;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
889
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
890 if (fontname)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
891 fontname[0] = '\0';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
892
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
893 for (i=0; i<5; i++)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
894 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
895 if (c1 && (e1 = strchr (c1, ':')))
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
896 *(e1) = '\0';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
897 if (c2 && (e2 = strchr (c2, ':')))
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
898 *(e2) = '\0';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
899
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
900 if (c1 && c1[0]!='\0')
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
901 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
902 if (c2 && c2[0]!='\0' && stricmp(c1, c2))
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
903 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
904 if (e1) *e1 = ':';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
905 if (e2) *e2 = ':';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
906 return 0;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
907 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
908 else if (fontname)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
909 strcat (strcat (fontname, c1), ":");
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
910 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
911 else if (fontname)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
912 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
913 if (c2 && c2[0]!='\0')
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
914 strcat (strcat (fontname, c2), ":");
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
915 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
916 strcat (fontname, ":");
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
917 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
918
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
919 if (e1) *(e1++) = ':';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
920 if (e2) *(e2++) = ':';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
921 c1=e1;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
922 c2=e2;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
923 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
924
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
925 if (fontname)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
926 fontname[strlen (fontname) - 1] = '\0'; /* Trim trailing ':' */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
927 return 1;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
928 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
929
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
930
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
931
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
932
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
933
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
934 /************************************************************************/
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
935 /* exports */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
936 /************************************************************************/
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
937
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
938 struct font_enum_t
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
939 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
940 HDC hdc;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
941 Lisp_Object list;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
942 };
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
943
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
944 static int CALLBACK
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
945 font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
946 int FontType, struct font_enum_t *font_enum)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
947 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
948 char fontname[MSW_FONTSIZE];
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
949 Lisp_Object fontname_lispstr;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
950 int i;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
951
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
952 /*
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
953 * The enumerated font weights are not to be trusted because:
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
954 * a) lpelfe->elfStyle is only filled in for TrueType fonts.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
955 * b) Not all Bold and Italic styles of all fonts (inluding some Vector,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
956 * Truetype and Raster fonts) are enumerated.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
957 * I guess that fonts for which Bold and Italic styles are generated
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
958 * 'on-the-fly' are not enumerated. It would be overly restrictive to
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
959 * disallow Bold And Italic weights for these fonts, so we just leave
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
960 * weights unspecified. This means that we have to weed out duplicates of
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
961 * those fonts that do get enumerated with different weights.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
962 */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
963 if (FontType == 0 /*vector*/ || FontType == TRUETYPE_FONTTYPE)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
964 /* Scalable, so leave pointsize blank */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
965 sprintf (fontname, "%s::::", lpelfe->elfLogFont.lfFaceName);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
966 else
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
967 /* Formula for pointsize->height from LOGFONT docs in Platform SDK */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
968 sprintf (fontname, "%s::%d::", lpelfe->elfLogFont.lfFaceName,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
969 MulDiv (lpntme->ntmTm.tmHeight - lpntme->ntmTm.tmInternalLeading,
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
970 72, GetDeviceCaps (font_enum->hdc, LOGPIXELSY)));
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
971
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
972 /*
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
973 * The enumerated font character set strings are not to be trusted because
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
974 * lpelfe->elfScript is returned in the host language and not in English.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
975 * We can't know a priori the translations of "Western", "Central European"
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
976 * etc into the host language, so we must use English. The same argument
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
977 * applies to the font weight string when matching fonts.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
978 */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
979 for (i=0; i<countof (charset_map); i++)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
980 if (lpelfe->elfLogFont.lfCharSet == charset_map[i].value)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
981 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
982 strcat (fontname, charset_map[i].name);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
983 break;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
984 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
985 if (i==countof (charset_map))
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
986 strcpy (fontname, charset_map[0].name);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
987
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
988 /* Add the font name to the list if not already there */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
989 fontname_lispstr = build_string (fontname);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
990 if (NILP (memq_no_quit (fontname_lispstr, font_enum->list)))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
991 font_enum->list = Fcons (fontname_lispstr, font_enum->list);
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
992
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
993 return 1;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
994 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
995
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
996 static int CALLBACK
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
997 font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
998 int FontType, struct font_enum_t *font_enum)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
999 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1000 /* This function gets called once per facename per character set.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1001 * We call a second callback to enumerate the fonts in each facename */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1002 return EnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1003 (FONTENUMPROC) font_enum_callback_2,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1004 (LPARAM) font_enum, 0);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1005 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1006
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1007 /*
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1008 * Enumerate the available on the HDC fonts and return a list of string
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1009 * font names.
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1010 */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1011 Lisp_Object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1012 mswindows_enumerate_fonts (HDC hdc)
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1013 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1014 /* This cannot CG */
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1015 LOGFONT logfont;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1016 struct font_enum_t font_enum;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1017
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1018 assert (hdc!=NULL);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1019 logfont.lfCharSet = DEFAULT_CHARSET;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1020 logfont.lfFaceName[0] = '\0';
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1021 logfont.lfPitchAndFamily = DEFAULT_PITCH;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1022 font_enum.hdc = hdc;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1023 font_enum.list = Qnil;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1024 EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1,
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1025 (LPARAM) (&font_enum), 0);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1026 return font_enum.list;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1027 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1028
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1029 static HFONT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1030 mswindows_create_font_variant (Lisp_Font_Instance* f,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1031 int under, int strike)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1032 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1033 /* Cannot GC */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1034
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1035 LOGFONT lf;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1036 HFONT hfont;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1037
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1038 assert (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) == NULL);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1039
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1040 if (GetObject (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0),
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1041 sizeof (lf), (void*) &lf) == 0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1042 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1043 hfont = MSWINDOWS_BAD_HFONT;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1044 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1045 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1046 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1047 lf.lfUnderline = under;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1048 lf.lfStrikeOut = strike;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1049
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1050 hfont = CreateFontIndirect (&lf);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1051 if (hfont == NULL)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1052 hfont = MSWINDOWS_BAD_HFONT;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1053 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1054
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1055 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) = hfont;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1056 return hfont;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1057 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1058
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1059 HFONT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1060 mswindows_get_hfont (Lisp_Font_Instance* f,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1061 int under, int strike)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1062 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1063 /* Cannot GC */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1064 HFONT hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1065
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1066 if (hfont == NULL)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1067 hfont = mswindows_create_font_variant (f, under, strike);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1068
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1069 /* If strikeout/underline variant of the font could not be
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1070 created, then use the base version of the font */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1071 if (hfont == MSWINDOWS_BAD_HFONT)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1072 hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1073
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1074 assert (hfont != NULL && hfont != MSWINDOWS_BAD_HFONT);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1075
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1076 return hfont;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1077 }
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1078
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1079 /************************************************************************/
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1080 /* methods */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1081 /************************************************************************/
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1082
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1083 static int
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1084 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1085 Lisp_Object device, Error_behavior errb)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1086 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1087 const char *extname;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1088 COLORREF color;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1089
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1090 TO_EXTERNAL_FORMAT (LISP_STRING, name,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1091 C_STRING_ALLOCA, extname,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1092 Qctext);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1093 color = mswindows_string_to_color(extname);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1094 if (color != -1)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1095 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1096 c->data = xnew (struct mswindows_color_instance_data);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1097 COLOR_INSTANCE_MSWINDOWS_COLOR (c) = color;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1098 return 1;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1099 }
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
1100 maybe_signal_simple_error ("Unrecognized color", name, Qcolor, errb);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1101 return(0);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1102 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1103
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 243
diff changeset
1104 #if 0
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1105 static void
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1106 mswindows_mark_color_instance (Lisp_Color_Instance *c)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1107 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1108 }
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 243
diff changeset
1109 #endif
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1110
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1111 static void
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1112 mswindows_print_color_instance (Lisp_Color_Instance *c,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1113 Lisp_Object printcharfun,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1114 int escapeflag)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1115 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1116 char buf[32];
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1117 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 217
diff changeset
1118 sprintf (buf, " %06ld=(%04X,%04X,%04X)", color & 0xffffff,
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1119 GetRValue(color)*257, GetGValue(color)*257, GetBValue(color)*257);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1120 write_c_string (buf, printcharfun);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1121 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1122
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1123 static void
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1124 mswindows_finalize_color_instance (Lisp_Color_Instance *c)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1125 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1126 if (c->data)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1127 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1128 xfree (c->data);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1129 c->data = 0;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1130 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1131 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1132
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1133 static int
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1134 mswindows_color_instance_equal (Lisp_Color_Instance *c1,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1135 Lisp_Color_Instance *c2,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1136 int depth)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1137 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1138 return (COLOR_INSTANCE_MSWINDOWS_COLOR(c1) == COLOR_INSTANCE_MSWINDOWS_COLOR(c2));
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1139 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1140
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1141 static unsigned long
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1142 mswindows_color_instance_hash (Lisp_Color_Instance *c, int depth)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1143 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1144 return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR(c);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1145 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1146
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1147 static Lisp_Object
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1148 mswindows_color_instance_rgb_components (Lisp_Color_Instance *c)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1149 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1150 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
243
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 239
diff changeset
1151 return list3 (make_int (GetRValue (color) * 257),
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 239
diff changeset
1152 make_int (GetGValue (color) * 257),
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 239
diff changeset
1153 make_int (GetBValue (color) * 257));
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1154 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1155
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1156 static int
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1157 mswindows_valid_color_name_p (struct device *d, Lisp_Object color)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1158 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1159 const char *extname;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1160
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1161 TO_EXTERNAL_FORMAT (LISP_STRING, color,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1162 C_STRING_ALLOCA, extname,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1163 Qctext);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1164 return (mswindows_string_to_color(extname)!=-1);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1165 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1166
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1167
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1168
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1169 static void
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1170 mswindows_finalize_font_instance (Lisp_Font_Instance *f);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1171
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1172 /*
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1173 * This is a work horse for both mswindows_initialize_font_instanc and
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1174 * msprinter_initialize_font_instance.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1175 */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1176 static int
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1177 initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1178 Lisp_Object device_font_list, HDC hdc,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1179 Error_behavior errb)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1180 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1181 const char *extname;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1182 LOGFONT logfont;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1183 int fields, i;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1184 int pt;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1185 char fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1186 char effects[LF_FACESIZE], charset[LF_FACESIZE];
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1187 char *c;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1188 HFONT hfont, hfont2;
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1189 TEXTMETRIC metrics;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1190
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1191 extname = XSTRING_DATA (name);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1192
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1193 /*
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1194 * mswindows fonts look like:
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1195 * fontname[:[weight ][style][:pointsize[:effects]]][:charset]
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1196 * The font name field shouldn't be empty.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1197 *
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1198 * ie:
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1199 * Lucida Console:Regular:10
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1200 * minimal:
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1201 * Courier New
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1202 * maximal:
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1203 * Courier New:Bold Italic:10:underline strikeout:western
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1204 */
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1205
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1206 fields = sscanf (extname, "%31[^:]:%31[^:]:%7[^:]:%31[^:]:%31s",
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1207 fontname, weight, points, effects, charset);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1208
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1209 /* This function is implemented in a fairly ad-hoc manner.
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1210 * The general idea is to validate and canonicalize each of the above fields
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1211 * at the same time as we build up the win32 LOGFONT structure. This enables
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1212 * us to use match_font() on a canonicalized font string to check the
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1213 * availability of the requested font */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1214
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1215 if (fields < 0)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1216 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1217 maybe_signal_simple_error ("Invalid font", name, Qfont, errb);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1218 return (0);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1219 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1220
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1221 if (fields>0 && strlen(fontname))
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1222 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1223 strncpy (logfont.lfFaceName, fontname, LF_FACESIZE);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1224 logfont.lfFaceName[LF_FACESIZE-1] = 0;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1225 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1226 else
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1227 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1228 maybe_signal_simple_error ("Must specify a font name", name, Qfont, errb);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1229 return (0);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1230 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1231
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1232 /* weight */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1233 if (fields < 2)
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1234 strcpy (weight, fontweight_map[0].name);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1235
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1236 /* Maybe split weight into weight and style */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1237 if ((c=strchr(weight, ' ')))
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1238 {
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1239 *c = '\0';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1240 style = c+1;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1241 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1242 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1243 style = NULL;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1244
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1245 for (i=0; i<countof (fontweight_map); i++)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1246 if (!stricmp (weight, fontweight_map[i].name))
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1247 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1248 logfont.lfWeight = fontweight_map[i].value;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1249 break;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1250 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1251 if (i == countof (fontweight_map)) /* No matching weight */
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1252 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1253 if (!style)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1254 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1255 logfont.lfWeight = FW_REGULAR;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1256 style = weight; /* May have specified style without weight */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1257 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1258 else
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1259 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1260 maybe_signal_simple_error ("Invalid font weight", name, Qfont, errb);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1261 return (0);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1262 }
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1263 }
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1264
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1265 if (style)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1266 {
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
1267 /* #### what about oblique? */
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1268 if (stricmp (style,"italic") == 0)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1269 logfont.lfItalic = TRUE;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1270 else
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1271 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1272 maybe_signal_simple_error ("Invalid font weight or style", name, Qfont, errb);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1273 return (0);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1274 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1275
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1276 /* Glue weight and style together again */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1277 if (weight != style)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1278 *c = ' ';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1279 }
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1280 else
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1281 logfont.lfItalic = FALSE;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1282
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1283 if (fields < 3)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1284 pt = 10; /* #### Should we reject strings that don't specify a size? */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1285 else if ((pt=atoi(points)) == 0)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1286 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1287 maybe_signal_simple_error ("Invalid font pointsize", name, Qfont, errb);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1288 return (0);
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1289 }
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1290
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1291 /* Formula for pointsize->height from LOGFONT docs in MSVC5 Platform SDK */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1292 logfont.lfHeight = -MulDiv(pt, GetDeviceCaps (hdc, LOGPIXELSY), 72);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1293 logfont.lfWidth = 0;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1294
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1295 /* Effects */
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1296 logfont.lfUnderline = FALSE;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1297 logfont.lfStrikeOut = FALSE;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1298 if (fields >= 4 && effects[0] != '\0')
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1299 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1300 char *effects2;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1301
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1302 /* Maybe split effects into effects and effects2 */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1303 if ((c=strchr (effects, ' ')))
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1304 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1305 *c = '\0';
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1306 effects2 = c+1;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1307 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1308 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1309 effects2 = NULL;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1310
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1311 if (stricmp (effects, "underline") == 0)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1312 logfont.lfUnderline = TRUE;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1313 else if (stricmp (effects, "strikeout") == 0)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1314 logfont.lfStrikeOut = TRUE;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1315 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1316 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1317 maybe_signal_simple_error ("Invalid font effect", name, Qfont, errb);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1318 return (0);
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1319 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1320
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1321 if (effects2 && effects2[0] != '\0')
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1322 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1323 if (stricmp (effects2, "underline") == 0)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1324 logfont.lfUnderline = TRUE;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1325 else if (stricmp (effects2, "strikeout") == 0)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1326 logfont.lfStrikeOut = TRUE;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1327 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1328 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1329 maybe_signal_simple_error ("Invalid font effect", name,
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1330 Qfont, errb);
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1331 return (0);
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1332 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1333 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1334
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1335 /* Regenerate sanitised effects string */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1336 if (logfont.lfUnderline)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1337 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1338 if (logfont.lfStrikeOut)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1339 strcpy (effects, "underline strikeout");
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1340 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1341 strcpy (effects, "underline");
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1342 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1343 else if (logfont.lfStrikeOut)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1344 strcpy (effects, "strikeout");
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1345 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1346 else
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1347 effects[0] = '\0';
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
1348
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1349 /* Charset */
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1350 /* charset can be specified even if earlier fields havn't been */
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1351 if (fields < 5)
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1352 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1353 if ((c=strchr (extname, ':')) && (c=strchr (c+1, ':')) &&
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1354 (c=strchr (c+1, ':')) && (c=strchr (c+1, ':')))
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1355 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1356 strncpy (charset, c+1, LF_FACESIZE);
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1357 charset[LF_FACESIZE-1] = '\0';
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1358 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1359 else
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1360 strcpy (charset, charset_map[0].name);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1361 }
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1362
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1363 for (i=0; i<countof (charset_map); i++)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1364 if (!stricmp (charset, charset_map[i].name))
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1365 {
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1366 logfont.lfCharSet = charset_map[i].value;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1367 break;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1368 }
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1369
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1370 if (i == countof (charset_map)) /* No matching charset */
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1371 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1372 maybe_signal_simple_error ("Invalid charset", name, Qfont, errb);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1373 return 0;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1374 }
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
1375
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1376 /* Misc crud */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1377 logfont.lfEscapement = logfont.lfOrientation = 0;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1378 #if 1
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1379 logfont.lfOutPrecision = OUT_DEFAULT_PRECIS;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1380 logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1381 logfont.lfQuality = DEFAULT_QUALITY;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1382 #else
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1383 logfont.lfOutPrecision = OUT_STROKE_PRECIS;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1384 logfont.lfClipPrecision = CLIP_STROKE_PRECIS;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1385 logfont.lfQuality = PROOF_QUALITY;
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1386 #endif
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1387 /* Default to monospaced if the specified fontname doesn't exist. */
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1388 logfont.lfPitchAndFamily = FF_MODERN;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1389
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1390 /* Windows will silently substitute a default font if the fontname specifies
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1391 a non-existent font. This is bad for screen fonts because it doesn't
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1392 allow higher-level code to see the error and to act appropriately.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1393 For instance complex_vars_of_faces() sets up a fallback list of fonts
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1394 for the default face. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1395
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1396 if (!NILP (device_font_list))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1397 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1398 Lisp_Object fonttail;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1399 char truename[MSW_FONTSIZE];
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1400
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1401 sprintf (truename, "%s:%s:%d:%s:%s", fontname, weight, pt, effects, charset);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1402 LIST_LOOP (fonttail, device_font_list)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1403 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1404 if (match_font (XSTRING_DATA (XCAR (fonttail)), truename, NULL))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1405 break;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1406 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1407 if (NILP (fonttail))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1408 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1409 maybe_signal_simple_error ("No matching font", name, Qfont, errb);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1410 return 0;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1411 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1412 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1413
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1414 if ((hfont = CreateFontIndirect(&logfont)) == NULL)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1415 {
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1416 maybe_signal_simple_error ("Couldn't create font", name, Qfont, errb);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1417 return 0;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1418 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1419
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1420 f->data = xnew_and_zero (struct mswindows_font_instance_data);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1421 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0) = hfont;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1422
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1423 /* Some underlined fonts have the descent of one pixel more than their
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1424 non-underlined counterparts. Font variants though are assumed to have
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1425 identical metrics. So get the font metrics from the underlined variant
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1426 of the font */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1427 hfont2 = mswindows_create_font_variant (f, 1, 0);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1428 if (hfont2 != MSWINDOWS_BAD_HFONT)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1429 hfont = hfont2;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1430
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1431 hfont2 = SelectObject(hdc, hfont);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1432 if (!hfont2)
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1433 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1434 mswindows_finalize_font_instance (f);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1435 maybe_signal_simple_error ("Couldn't map font", name, Qfont, errb);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1436 return 0;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1437 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1438 GetTextMetrics (hdc, &metrics);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1439 SelectObject(hdc, hfont2);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1440
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1441 f->width = (unsigned short) metrics.tmAveCharWidth;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1442 f->height = (unsigned short) metrics.tmHeight;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1443 f->ascent = (unsigned short) metrics.tmAscent;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1444 f->descent = (unsigned short) metrics.tmDescent;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1445 f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1446
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1447 return 1;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1448 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1449
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1450 static int
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1451 mswindows_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1452 Lisp_Object device, Error_behavior errb)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1453 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1454 HDC hdc = CreateCompatibleDC (NULL);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1455 Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device));
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1456 int res = initialize_font_instance (f, name, font_list, hdc, errb);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1457 DeleteDC (hdc);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1458 return res;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1459 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1460
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1461 static int
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1462 msprinter_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1463 Lisp_Object device, Error_behavior errb)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1464 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1465 HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (device));
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1466 Lisp_Object font_list = DEVICE_MSPRINTER_FONTLIST (XDEVICE (device));
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1467 return initialize_font_instance (f, name, font_list, hdc, errb);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1468 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1469
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1470 static void
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1471 mswindows_finalize_font_instance (Lisp_Font_Instance *f)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1472 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1473 int i;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1474
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1475 if (f->data)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1476 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1477 for (i = 0; i < MSWINDOWS_NUM_FONT_VARIANTS; i++)
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1478 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1479 if (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != NULL
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1480 && FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != MSWINDOWS_BAD_HFONT)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1481 DeleteObject (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i));
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
1482 }
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1483
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1484 xfree (f->data);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1485 f->data = 0;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1486 }
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1487 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1488
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 243
diff changeset
1489 #if 0
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1490 static void
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1491 mswindows_mark_font_instance (Lisp_Font_Instance *f)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1492 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1493 }
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 243
diff changeset
1494 #endif
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1495
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1496 static void
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1497 mswindows_print_font_instance (Lisp_Font_Instance *f,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1498 Lisp_Object printcharfun,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1499 int escapeflag)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1500 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1501 char buf[10];
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1502 sprintf (buf, " 0x%lx",
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1503 (unsigned long)FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0));
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1504 write_c_string (buf, printcharfun);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1505 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1506
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1507 static Lisp_Object
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1508 mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1509 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1510 Lisp_Object fonttail, result = Qnil;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1511 char *extpattern;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1512
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1513 TO_EXTERNAL_FORMAT (LISP_STRING, pattern,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1514 C_STRING_ALLOCA, extpattern,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1515 Qctext);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1516
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1517 LIST_LOOP (fonttail, DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device)))
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1518 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1519 if (match_font (XSTRING_DATA (XCAR (fonttail)), extpattern, NULL))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1520 result = Fcons (XCAR (fonttail), result);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1521 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1522
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1523 return Fnreverse (result);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1524 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1525
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1526 /* Fill in missing parts of a font spec. This is primarily intended as a
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1527 * helper function for the functions below.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1528 * mswindows fonts look like:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1529 * fontname[:[weight][ style][:pointsize[:effects]]][:charset]
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1530 * A minimal mswindows font spec looks like:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1531 * Courier New
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1532 * A maximal mswindows font spec looks like:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1533 * Courier New:Bold Italic:10:underline strikeout:Western
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1534 * Missing parts of the font spec should be filled in with these values:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1535 * Courier New:Regular:10::Western */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1536 static Lisp_Object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1537 mswindows_font_instance_truename (Lisp_Font_Instance *f, Error_behavior errb)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1538 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1539 int nsep=0;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1540 char *name = (char *) XSTRING_DATA (f->name);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1541 char* ptr = name;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1542 char* extname = alloca (strlen (name) + 19);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1543 strcpy (extname, name);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1544
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1545 while ((ptr = strchr (ptr, ':')) != 0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1546 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1547 ptr++;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1548 nsep++;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1549 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1550
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1551 switch (nsep)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1552 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1553 case 0:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1554 strcat (extname, ":Regular:10::Western");
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1555 break;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1556 case 1:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1557 strcat (extname, ":10::Western");
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1558 break;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1559 case 2:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1560 strcat (extname, "::Western");
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1561 break;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1562 case 3:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1563 strcat (extname, ":Western");
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1564 break;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1565 default:;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1566 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1567
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1568 return build_ext_string (extname, Qnative);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1569 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1570
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1571 #ifdef MULE
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1572
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1573 static int
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1574 mswindows_font_spec_matches_charset (struct device *d, Lisp_Object charset,
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1575 const Bufbyte *nonreloc, Lisp_Object reloc,
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1576 Bytecount offset, Bytecount length)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1577 {
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
1578 /* #### Implement me */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1579 if (UNBOUNDP (charset))
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1580 return 1;
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1581
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1582 return 1;
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1583 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1584
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1585 /* find a font spec that matches font spec FONT and also matches
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1586 (the registry of) CHARSET. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1587 static Lisp_Object
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1588 mswindows_find_charset_font (Lisp_Object device, Lisp_Object font,
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1589 Lisp_Object charset)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1590 {
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
1591 /* #### Implement me */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1592 return build_string ("Courier New:Regular:10");
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1593 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1594
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
1595 #endif /* MULE */
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1596
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1597
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1598 /************************************************************************/
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1599 /* non-methods */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1600 /************************************************************************/
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1601
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1602 DEFUN ("mswindows-color-list", Fmswindows_color_list, 0, 0, 0, /*
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1603 Return a list of the colors available on mswindows devices.
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1604 */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1605 ())
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1606 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1607 Lisp_Object result = Qnil;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1608 int i;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1609
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1610 for (i=0; i<countof (mswindows_X_color_map); i++)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1611 result = Fcons (build_string (mswindows_X_color_map[i].name), result);
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1612
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1613 return Fnreverse (result);
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1614 }
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1615
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1616
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1617
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1618 /************************************************************************/
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1619 /* initialization */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1620 /************************************************************************/
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1621
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1622 void
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1623 syms_of_objects_mswindows (void)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1624 {
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
1625 DEFSUBR (Fmswindows_color_list);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1626 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1627
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1628 void
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1629 console_type_create_objects_mswindows (void)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1630 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1631 /* object methods */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1632 CONSOLE_HAS_METHOD (mswindows, initialize_color_instance);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1633 /* CONSOLE_HAS_METHOD (mswindows, mark_color_instance); */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1634 CONSOLE_HAS_METHOD (mswindows, print_color_instance);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1635 CONSOLE_HAS_METHOD (mswindows, finalize_color_instance);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1636 CONSOLE_HAS_METHOD (mswindows, color_instance_equal);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1637 CONSOLE_HAS_METHOD (mswindows, color_instance_hash);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1638 CONSOLE_HAS_METHOD (mswindows, color_instance_rgb_components);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1639 CONSOLE_HAS_METHOD (mswindows, valid_color_name_p);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1640
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1641 CONSOLE_HAS_METHOD (mswindows, initialize_font_instance);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1642 /* CONSOLE_HAS_METHOD (mswindows, mark_font_instance); */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1643 CONSOLE_HAS_METHOD (mswindows, print_font_instance);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1644 CONSOLE_HAS_METHOD (mswindows, finalize_font_instance);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1645 CONSOLE_HAS_METHOD (mswindows, font_instance_truename);
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1646 CONSOLE_HAS_METHOD (mswindows, list_fonts);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1647 #ifdef MULE
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1648 CONSOLE_HAS_METHOD (mswindows, font_spec_matches_charset);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1649 CONSOLE_HAS_METHOD (mswindows, find_charset_font);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1650 #endif
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1651
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1652 /* Printer methods - delegate most to windows methods,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1653 since graphical objects behave the same way. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1654
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1655 CONSOLE_INHERITS_METHOD (msprinter, mswindows, initialize_color_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1656 /* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_color_instance); */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1657 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_color_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1658 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_color_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1659 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_equal);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1660 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_hash);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1661 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_rgb_components);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1662 CONSOLE_INHERITS_METHOD (msprinter, mswindows, valid_color_name_p);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1663
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1664 CONSOLE_HAS_METHOD (msprinter, initialize_font_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1665 /* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_font_instance); */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1666 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_font_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1667 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_font_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1668 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_instance_truename);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1669 CONSOLE_INHERITS_METHOD (msprinter, mswindows, list_fonts);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1670 #ifdef MULE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1671 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_spec_matches_charset);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1672 CONSOLE_INHERITS_METHOD (msprinter, mswindows, find_charset_font);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 380
diff changeset
1673 #endif
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1674 }
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1675
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1676 void
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1677 vars_of_objects_mswindows (void)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1678 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1679 }