Mercurial > hg > xemacs-beta
annotate src/fontcolor-msw.c @ 5927:b58b74274fa2 cygwin
changes from long ago, never committed...
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 15 Dec 2021 19:02:33 +0000 |
parents | 56144c8593a8 |
children | e2fae7783046 |
rev | line source |
---|---|
428 | 1 /* mswindows-specific Lisp objects. |
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc. | |
3 Copyright (C) 1995 Board of Trustees, University of Illinois. | |
4 Copyright (C) 1995 Tinker Systems. | |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
5 Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004, 2005, 2010 Ben Wing. |
428 | 6 Copyright (C) 1995 Sun Microsystems, Inc. |
7 Copyright (C) 1997 Jonathan Harris. | |
8 | |
9 This file is part of XEmacs. | |
10 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5256
diff
changeset
|
11 XEmacs is free software: you can redistribute it and/or modify it |
428 | 12 under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5256
diff
changeset
|
13 Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5256
diff
changeset
|
14 option) any later version. |
428 | 15 |
16 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
19 for more details. | |
20 | |
21 You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5256
diff
changeset
|
22 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
428 | 23 |
24 /* Synched up with: Not in FSF. */ | |
25 | |
26 /* Authorship: | |
27 | |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
28 This file created by Jonathan Harris, November 1997 for 21.0; based |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
5024
diff
changeset
|
29 heavily on fontcolor-x.c (see authorship there). Much further work |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
30 by Ben Wing. |
428 | 31 */ |
32 | |
793 | 33 /* This function Mule-ized by Ben Wing, 3-24-02. */ |
428 | 34 |
35 /* TODO: palette handling */ | |
36 | |
37 #include <config.h> | |
38 #include "lisp.h" | |
39 | |
872 | 40 #include "console-msw-impl.h" |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
5024
diff
changeset
|
41 #include "fontcolor-msw-impl.h" |
800 | 42 |
428 | 43 #include "buffer.h" |
771 | 44 #include "charset.h" |
872 | 45 #include "device-impl.h" |
788 | 46 #include "elhash.h" |
428 | 47 #include "insdel.h" |
788 | 48 #include "opaque.h" |
428 | 49 |
442 | 50 typedef struct colormap_t |
428 | 51 { |
2367 | 52 const Ascbyte *name; |
442 | 53 COLORREF colorref; |
428 | 54 } colormap_t; |
55 | |
56 /* Colors from X11R6 "XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp" */ | |
771 | 57 /* MSWindows tends to round up the numbers in its palette, ie where X uses |
442 | 58 * 127, MSWindows uses 128. Colors commented as "Adjusted" are tweaked to |
59 * match the Windows standard palette to increase the likelihood of | |
60 * mswindows_color_to_string() finding a named match. | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
61 |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
62 Sorted case-insensitively by the string name of the color. |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
63 |
442 | 64 */ |
65 static const colormap_t mswindows_X_color_map[] = | |
428 | 66 { |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
67 {"AliceBlue" , PALETTERGB (240, 248, 255) }, |
442 | 68 {"AntiqueWhite" , PALETTERGB (250, 235, 215) }, |
69 {"AntiqueWhite1" , PALETTERGB (255, 239, 219) }, | |
70 {"AntiqueWhite2" , PALETTERGB (238, 223, 204) }, | |
71 {"AntiqueWhite3" , PALETTERGB (205, 192, 176) }, | |
72 {"AntiqueWhite4" , PALETTERGB (139, 131, 120) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
73 {"aquamarine" , PALETTERGB (127, 255, 212) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
74 {"aquamarine1" , PALETTERGB (127, 255, 212) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
75 {"aquamarine2" , PALETTERGB (118, 238, 198) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
76 {"aquamarine3" , PALETTERGB (102, 205, 170) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
77 {"aquamarine4" , PALETTERGB (69, 139, 116) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
78 {"azure" , PALETTERGB (240, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
79 {"azure1" , PALETTERGB (240, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
80 {"azure2" , PALETTERGB (224, 238, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
81 {"azure3" , PALETTERGB (193, 205, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
82 {"azure4" , PALETTERGB (131, 139, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
83 {"beige" , PALETTERGB (245, 245, 220) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
84 {"bisque" , PALETTERGB (255, 228, 196) }, |
442 | 85 {"bisque1" , PALETTERGB (255, 228, 196) }, |
86 {"bisque2" , PALETTERGB (238, 213, 183) }, | |
87 {"bisque3" , PALETTERGB (205, 183, 158) }, | |
88 {"bisque4" , PALETTERGB (139, 125, 107) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
89 {"black" , PALETTERGB (0, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
90 {"BlanchedAlmond" , PALETTERGB (255, 235, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
91 {"blue" , PALETTERGB (0, 0, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
92 {"blue1" , PALETTERGB (0, 0, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
93 {"blue2" , PALETTERGB (0, 0, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
94 {"blue3" , PALETTERGB (0, 0, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
95 {"blue4" , PALETTERGB (0, 0, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
96 {"BlueViolet" , PALETTERGB (138, 43, 226) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
97 {"brown" , PALETTERGB (165, 42, 42) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
98 {"brown1" , PALETTERGB (255, 64, 64) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
99 {"brown2" , PALETTERGB (238, 59, 59) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
100 {"brown3" , PALETTERGB (205, 51, 51) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
101 {"brown4" , PALETTERGB (139, 35, 35) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
102 {"burlywood" , PALETTERGB (222, 184, 135) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
103 {"burlywood1" , PALETTERGB (255, 211, 155) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
104 {"burlywood2" , PALETTERGB (238, 197, 145) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
105 {"burlywood3" , PALETTERGB (205, 170, 125) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
106 {"burlywood4" , PALETTERGB (139, 115, 85) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
107 {"CadetBlue" , PALETTERGB (95, 158, 160) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
108 {"CadetBlue1" , PALETTERGB (152, 245, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
109 {"CadetBlue2" , PALETTERGB (144, 220, 240) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
110 {"CadetBlue3" , PALETTERGB (122, 197, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
111 {"CadetBlue4" , PALETTERGB (83, 134, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
112 {"chartreuse" , PALETTERGB (127, 255, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
113 {"chartreuse1" , PALETTERGB (127, 255, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
114 {"chartreuse2" , PALETTERGB (118, 238, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
115 {"chartreuse3" , PALETTERGB (102, 205, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
116 {"chartreuse4" , PALETTERGB (69, 139, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
117 {"chocolate" , PALETTERGB (210, 105, 30) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
118 {"chocolate1" , PALETTERGB (255, 127, 36) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
119 {"chocolate2" , PALETTERGB (238, 118, 33) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
120 {"chocolate3" , PALETTERGB (205, 102, 29) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
121 {"chocolate4" , PALETTERGB (139, 69, 19) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
122 {"coral" , PALETTERGB (255, 127, 80) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
123 {"coral1" , PALETTERGB (255, 114, 86) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
124 {"coral2" , PALETTERGB (238, 106, 80) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
125 {"coral3" , PALETTERGB (205, 91, 69) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
126 {"coral4" , PALETTERGB (139, 62, 47) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
127 {"CornflowerBlue" , PALETTERGB (100, 149, 237) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
128 {"cornsilk" , PALETTERGB (255, 248, 220) }, |
442 | 129 {"cornsilk1" , PALETTERGB (255, 248, 220) }, |
130 {"cornsilk2" , PALETTERGB (238, 232, 205) }, | |
131 {"cornsilk3" , PALETTERGB (205, 200, 177) }, | |
132 {"cornsilk4" , PALETTERGB (139, 136, 120) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
133 {"cyan" , PALETTERGB (0, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
134 {"cyan1" , PALETTERGB (0, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
135 {"cyan2" , PALETTERGB (0, 238, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
136 {"cyan3" , PALETTERGB (0, 205, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
137 {"cyan4" , PALETTERGB (0, 139, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
138 {"DarkBlue" , PALETTERGB (0, 0, 128) }, /* Adjusted == Navy */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
139 {"DarkCyan" , PALETTERGB (0, 128, 128) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
140 {"DarkGoldenrod" , PALETTERGB (184, 134, 11) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
141 {"DarkGoldenrod1" , PALETTERGB (255, 185, 15) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
142 {"DarkGoldenrod2" , PALETTERGB (238, 173, 14) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
143 {"DarkGoldenrod3" , PALETTERGB (205, 149, 12) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
144 {"DarkGoldenrod4" , PALETTERGB (139, 101, 8) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
145 {"DarkGray" , PALETTERGB (169, 169, 169) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
146 {"DarkGreen" , PALETTERGB (0, 128, 0) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
147 {"DarkGrey" , PALETTERGB (169, 169, 169) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
148 {"DarkKhaki" , PALETTERGB (189, 183, 107) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
149 {"DarkMagenta" , PALETTERGB (128, 0, 128) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
150 {"DarkOliveGreen" , PALETTERGB (85, 107, 47) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
151 {"DarkOliveGreen1" , PALETTERGB (202, 255, 112) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
152 {"DarkOliveGreen2" , PALETTERGB (188, 238, 104) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
153 {"DarkOliveGreen3" , PALETTERGB (162, 205, 90) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
154 {"DarkOliveGreen4" , PALETTERGB (110, 139, 61) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
155 {"DarkOrange" , PALETTERGB (255, 140, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
156 {"DarkOrange1" , PALETTERGB (255, 127, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
157 {"DarkOrange2" , PALETTERGB (238, 118, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
158 {"DarkOrange3" , PALETTERGB (205, 102, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
159 {"DarkOrange4" , PALETTERGB (139, 69, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
160 {"DarkOrchid" , PALETTERGB (153, 50, 204) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
161 {"DarkOrchid1" , PALETTERGB (191, 62, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
162 {"DarkOrchid2" , PALETTERGB (178, 58, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
163 {"DarkOrchid3" , PALETTERGB (154, 50, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
164 {"DarkOrchid4" , PALETTERGB (104, 34, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
165 {"DarkRed" , PALETTERGB (128, 0, 0) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
166 {"DarkSalmon" , PALETTERGB (233, 150, 122) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
167 {"DarkSeaGreen" , PALETTERGB (143, 188, 143) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
168 {"DarkSeaGreen1" , PALETTERGB (193, 255, 193) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
169 {"DarkSeaGreen2" , PALETTERGB (180, 238, 180) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
170 {"DarkSeaGreen3" , PALETTERGB (155, 205, 155) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
171 {"DarkSeaGreen4" , PALETTERGB (105, 139, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
172 {"DarkSlateBlue" , PALETTERGB (72, 61, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
173 {"DarkSlateGray" , PALETTERGB (47, 79, 79) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
174 {"DarkSlateGray1" , PALETTERGB (151, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
175 {"DarkSlateGray2" , PALETTERGB (141, 238, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
176 {"DarkSlateGray3" , PALETTERGB (121, 205, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
177 {"DarkSlateGray4" , PALETTERGB (82, 139, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
178 {"DarkSlateGrey" , PALETTERGB (47, 79, 79) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
179 {"DarkTurquoise" , PALETTERGB (0, 206, 209) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
180 {"DarkViolet" , PALETTERGB (148, 0, 211) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
181 {"DarkYellow" , PALETTERGB (128, 128, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
182 {"DeepPink" , PALETTERGB (255, 20, 147) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
183 {"DeepPink1" , PALETTERGB (255, 20, 147) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
184 {"DeepPink2" , PALETTERGB (238, 18, 137) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
185 {"DeepPink3" , PALETTERGB (205, 16, 118) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
186 {"DeepPink4" , PALETTERGB (139, 10, 80) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
187 {"DeepSkyBlue" , PALETTERGB (0, 191, 255) }, |
442 | 188 {"DeepSkyBlue1" , PALETTERGB (0, 191, 255) }, |
189 {"DeepSkyBlue2" , PALETTERGB (0, 178, 238) }, | |
190 {"DeepSkyBlue3" , PALETTERGB (0, 154, 205) }, | |
191 {"DeepSkyBlue4" , PALETTERGB (0, 104, 139) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
192 {"DimGray" , PALETTERGB (105, 105, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
193 {"DimGrey" , PALETTERGB (105, 105, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
194 {"DodgerBlue" , PALETTERGB (30, 144, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
195 {"DodgerBlue1" , PALETTERGB (30, 144, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
196 {"DodgerBlue2" , PALETTERGB (28, 134, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
197 {"DodgerBlue3" , PALETTERGB (24, 116, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
198 {"DodgerBlue4" , PALETTERGB (16, 78, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
199 {"firebrick" , PALETTERGB (178, 34, 34) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
200 {"firebrick1" , PALETTERGB (255, 48, 48) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
201 {"firebrick2" , PALETTERGB (238, 44, 44) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
202 {"firebrick3" , PALETTERGB (205, 38, 38) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
203 {"firebrick4" , PALETTERGB (139, 26, 26) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
204 {"FloralWhite" , PALETTERGB (255, 250, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
205 {"ForestGreen" , PALETTERGB (34, 139, 34) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
206 {"gainsboro" , PALETTERGB (220, 220, 220) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
207 {"GhostWhite" , PALETTERGB (248, 248, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
208 {"gold" , PALETTERGB (255, 215, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
209 {"gold1" , PALETTERGB (255, 215, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
210 {"gold2" , PALETTERGB (238, 201, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
211 {"gold3" , PALETTERGB (205, 173, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
212 {"gold4" , PALETTERGB (139, 117, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
213 {"goldenrod" , PALETTERGB (218, 165, 32) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
214 {"goldenrod1" , PALETTERGB (255, 193, 37) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
215 {"goldenrod2" , PALETTERGB (238, 180, 34) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
216 {"goldenrod3" , PALETTERGB (205, 155, 29) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
217 {"goldenrod4" , PALETTERGB (139, 105, 20) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
218 {"gray" , PALETTERGB (190, 190, 190) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
219 {"gray0" , PALETTERGB (0, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
220 {"gray1" , PALETTERGB (3, 3, 3) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
221 {"gray10" , PALETTERGB (26, 26, 26) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
222 {"gray100" , PALETTERGB (255, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
223 {"gray11" , PALETTERGB (28, 28, 28) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
224 {"gray12" , PALETTERGB (31, 31, 31) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
225 {"gray13" , PALETTERGB (33, 33, 33) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
226 {"gray14" , PALETTERGB (36, 36, 36) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
227 {"gray15" , PALETTERGB (38, 38, 38) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
228 {"gray16" , PALETTERGB (41, 41, 41) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
229 {"gray17" , PALETTERGB (43, 43, 43) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
230 {"gray18" , PALETTERGB (46, 46, 46) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
231 {"gray19" , PALETTERGB (48, 48, 48) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
232 {"gray2" , PALETTERGB (5, 5, 5) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
233 {"gray20" , PALETTERGB (51, 51, 51) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
234 {"gray21" , PALETTERGB (54, 54, 54) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
235 {"gray22" , PALETTERGB (56, 56, 56) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
236 {"gray23" , PALETTERGB (59, 59, 59) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
237 {"gray24" , PALETTERGB (61, 61, 61) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
238 {"gray25" , PALETTERGB (64, 64, 64) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
239 {"gray26" , PALETTERGB (66, 66, 66) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
240 {"gray27" , PALETTERGB (69, 69, 69) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
241 {"gray28" , PALETTERGB (71, 71, 71) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
242 {"gray29" , PALETTERGB (74, 74, 74) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
243 {"gray3" , PALETTERGB (8, 8, 8) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
244 {"gray30" , PALETTERGB (77, 77, 77) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
245 {"gray31" , PALETTERGB (79, 79, 79) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
246 {"gray32" , PALETTERGB (82, 82, 82) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
247 {"gray33" , PALETTERGB (84, 84, 84) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
248 {"gray34" , PALETTERGB (87, 87, 87) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
249 {"gray35" , PALETTERGB (89, 89, 89) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
250 {"gray36" , PALETTERGB (92, 92, 92) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
251 {"gray37" , PALETTERGB (94, 94, 94) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
252 {"gray38" , PALETTERGB (97, 97, 97) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
253 {"gray39" , PALETTERGB (99, 99, 99) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
254 {"gray4" , PALETTERGB (10, 10, 10) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
255 {"gray40" , PALETTERGB (102, 102, 102) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
256 {"gray41" , PALETTERGB (105, 105, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
257 {"gray42" , PALETTERGB (107, 107, 107) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
258 {"gray43" , PALETTERGB (110, 110, 110) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
259 {"gray44" , PALETTERGB (112, 112, 112) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
260 {"gray45" , PALETTERGB (115, 115, 115) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
261 {"gray46" , PALETTERGB (117, 117, 117) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
262 {"gray47" , PALETTERGB (120, 120, 120) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
263 {"gray48" , PALETTERGB (122, 122, 122) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
264 {"gray49" , PALETTERGB (125, 125, 125) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
265 {"gray5" , PALETTERGB (13, 13, 13) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
266 {"gray50" , PALETTERGB (128, 128, 128) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
267 {"gray51" , PALETTERGB (130, 130, 130) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
268 {"gray52" , PALETTERGB (133, 133, 133) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
269 {"gray53" , PALETTERGB (135, 135, 135) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
270 {"gray54" , PALETTERGB (138, 138, 138) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
271 {"gray55" , PALETTERGB (140, 140, 140) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
272 {"gray56" , PALETTERGB (143, 143, 143) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
273 {"gray57" , PALETTERGB (145, 145, 145) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
274 {"gray58" , PALETTERGB (148, 148, 148) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
275 {"gray59" , PALETTERGB (150, 150, 150) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
276 {"gray6" , PALETTERGB (15, 15, 15) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
277 {"gray60" , PALETTERGB (153, 153, 153) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
278 {"gray61" , PALETTERGB (156, 156, 156) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
279 {"gray62" , PALETTERGB (158, 158, 158) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
280 {"gray63" , PALETTERGB (161, 161, 161) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
281 {"gray64" , PALETTERGB (163, 163, 163) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
282 {"gray65" , PALETTERGB (166, 166, 166) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
283 {"gray66" , PALETTERGB (168, 168, 168) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
284 {"gray67" , PALETTERGB (171, 171, 171) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
285 {"gray68" , PALETTERGB (173, 173, 173) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
286 {"gray69" , PALETTERGB (176, 176, 176) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
287 {"gray7" , PALETTERGB (18, 18, 18) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
288 {"gray70" , PALETTERGB (179, 179, 179) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
289 {"gray71" , PALETTERGB (181, 181, 181) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
290 {"gray72" , PALETTERGB (184, 184, 184) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
291 {"gray73" , PALETTERGB (186, 186, 186) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
292 {"gray74" , PALETTERGB (189, 189, 189) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
293 {"gray75" , PALETTERGB (192, 192, 192) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
294 {"gray76" , PALETTERGB (194, 194, 194) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
295 {"gray77" , PALETTERGB (196, 196, 196) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
296 {"gray78" , PALETTERGB (199, 199, 199) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
297 {"gray79" , PALETTERGB (201, 201, 201) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
298 {"gray8" , PALETTERGB (20, 20, 20) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
299 {"gray80" , PALETTERGB (204, 204, 204) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
300 {"gray81" , PALETTERGB (207, 207, 207) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
301 {"gray82" , PALETTERGB (209, 209, 209) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
302 {"gray83" , PALETTERGB (212, 212, 212) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
303 {"gray84" , PALETTERGB (214, 214, 214) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
304 {"gray85" , PALETTERGB (217, 217, 217) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
305 {"gray86" , PALETTERGB (219, 219, 219) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
306 {"gray87" , PALETTERGB (222, 222, 222) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
307 {"gray88" , PALETTERGB (224, 224, 224) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
308 {"gray89" , PALETTERGB (227, 227, 227) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
309 {"gray9" , PALETTERGB (23, 23, 23) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
310 {"gray90" , PALETTERGB (229, 229, 229) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
311 {"gray91" , PALETTERGB (232, 232, 232) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
312 {"gray92" , PALETTERGB (235, 235, 235) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
313 {"gray93" , PALETTERGB (237, 237, 237) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
314 {"gray94" , PALETTERGB (240, 240, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
315 {"gray95" , PALETTERGB (242, 242, 242) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
316 {"gray96" , PALETTERGB (245, 245, 245) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
317 {"gray97" , PALETTERGB (247, 247, 247) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
318 {"gray98" , PALETTERGB (250, 250, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
319 {"gray99" , PALETTERGB (252, 252, 252) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
320 {"green" , PALETTERGB (0, 255, 0) }, |
442 | 321 {"green1" , PALETTERGB (0, 255, 0) }, |
322 {"green2" , PALETTERGB (0, 238, 0) }, | |
323 {"green3" , PALETTERGB (0, 205, 0) }, | |
324 {"green4" , PALETTERGB (0, 139, 0) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
325 {"GreenYellow" , PALETTERGB (173, 255, 47) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
326 {"grey" , PALETTERGB (190, 190, 190) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
327 {"grey0" , PALETTERGB (0, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
328 {"grey1" , PALETTERGB (3, 3, 3) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
329 {"grey10" , PALETTERGB (26, 26, 26) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
330 {"grey100" , PALETTERGB (255, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
331 {"grey11" , PALETTERGB (28, 28, 28) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
332 {"grey12" , PALETTERGB (31, 31, 31) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
333 {"grey13" , PALETTERGB (33, 33, 33) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
334 {"grey14" , PALETTERGB (36, 36, 36) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
335 {"grey15" , PALETTERGB (38, 38, 38) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
336 {"grey16" , PALETTERGB (41, 41, 41) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
337 {"grey17" , PALETTERGB (43, 43, 43) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
338 {"grey18" , PALETTERGB (46, 46, 46) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
339 {"grey19" , PALETTERGB (48, 48, 48) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
340 {"grey2" , PALETTERGB (5, 5, 5) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
341 {"grey20" , PALETTERGB (51, 51, 51) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
342 {"grey21" , PALETTERGB (54, 54, 54) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
343 {"grey22" , PALETTERGB (56, 56, 56) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
344 {"grey23" , PALETTERGB (59, 59, 59) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
345 {"grey24" , PALETTERGB (61, 61, 61) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
346 {"grey25" , PALETTERGB (64, 64, 64) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
347 {"grey26" , PALETTERGB (66, 66, 66) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
348 {"grey27" , PALETTERGB (69, 69, 69) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
349 {"grey28" , PALETTERGB (71, 71, 71) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
350 {"grey29" , PALETTERGB (74, 74, 74) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
351 {"grey3" , PALETTERGB (8, 8, 8) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
352 {"grey30" , PALETTERGB (77, 77, 77) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
353 {"grey31" , PALETTERGB (79, 79, 79) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
354 {"grey32" , PALETTERGB (82, 82, 82) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
355 {"grey33" , PALETTERGB (84, 84, 84) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
356 {"grey34" , PALETTERGB (87, 87, 87) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
357 {"grey35" , PALETTERGB (89, 89, 89) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
358 {"grey36" , PALETTERGB (92, 92, 92) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
359 {"grey37" , PALETTERGB (94, 94, 94) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
360 {"grey38" , PALETTERGB (97, 97, 97) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
361 {"grey39" , PALETTERGB (99, 99, 99) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
362 {"grey4" , PALETTERGB (10, 10, 10) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
363 {"grey40" , PALETTERGB (102, 102, 102) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
364 {"grey41" , PALETTERGB (105, 105, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
365 {"grey42" , PALETTERGB (107, 107, 107) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
366 {"grey43" , PALETTERGB (110, 110, 110) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
367 {"grey44" , PALETTERGB (112, 112, 112) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
368 {"grey45" , PALETTERGB (115, 115, 115) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
369 {"grey46" , PALETTERGB (117, 117, 117) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
370 {"grey47" , PALETTERGB (120, 120, 120) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
371 {"grey48" , PALETTERGB (122, 122, 122) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
372 {"grey49" , PALETTERGB (125, 125, 125) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
373 {"grey5" , PALETTERGB (13, 13, 13) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
374 {"grey50" , PALETTERGB (128, 128, 128) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
375 {"grey51" , PALETTERGB (130, 130, 130) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
376 {"grey52" , PALETTERGB (133, 133, 133) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
377 {"grey53" , PALETTERGB (135, 135, 135) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
378 {"grey54" , PALETTERGB (138, 138, 138) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
379 {"grey55" , PALETTERGB (140, 140, 140) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
380 {"grey56" , PALETTERGB (143, 143, 143) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
381 {"grey57" , PALETTERGB (145, 145, 145) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
382 {"grey58" , PALETTERGB (148, 148, 148) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
383 {"grey59" , PALETTERGB (150, 150, 150) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
384 {"grey6" , PALETTERGB (15, 15, 15) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
385 {"grey60" , PALETTERGB (153, 153, 153) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
386 {"grey61" , PALETTERGB (156, 156, 156) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
387 {"grey62" , PALETTERGB (158, 158, 158) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
388 {"grey63" , PALETTERGB (161, 161, 161) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
389 {"grey64" , PALETTERGB (163, 163, 163) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
390 {"grey65" , PALETTERGB (166, 166, 166) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
391 {"grey66" , PALETTERGB (168, 168, 168) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
392 {"grey67" , PALETTERGB (171, 171, 171) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
393 {"grey68" , PALETTERGB (173, 173, 173) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
394 {"grey69" , PALETTERGB (176, 176, 176) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
395 {"grey7" , PALETTERGB (18, 18, 18) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
396 {"grey70" , PALETTERGB (179, 179, 179) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
397 {"grey71" , PALETTERGB (181, 181, 181) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
398 {"grey72" , PALETTERGB (184, 184, 184) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
399 {"grey73" , PALETTERGB (186, 186, 186) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
400 {"grey74" , PALETTERGB (189, 189, 189) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
401 {"grey75" , PALETTERGB (192, 192, 192) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
402 {"grey76" , PALETTERGB (194, 194, 194) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
403 {"grey77" , PALETTERGB (196, 196, 196) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
404 {"grey78" , PALETTERGB (199, 199, 199) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
405 {"grey79" , PALETTERGB (201, 201, 201) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
406 {"grey8" , PALETTERGB (20, 20, 20) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
407 {"grey80" , PALETTERGB (204, 204, 204) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
408 {"grey81" , PALETTERGB (207, 207, 207) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
409 {"grey82" , PALETTERGB (209, 209, 209) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
410 {"grey83" , PALETTERGB (212, 212, 212) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
411 {"grey84" , PALETTERGB (214, 214, 214) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
412 {"grey85" , PALETTERGB (217, 217, 217) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
413 {"grey86" , PALETTERGB (219, 219, 219) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
414 {"grey87" , PALETTERGB (222, 222, 222) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
415 {"grey88" , PALETTERGB (224, 224, 224) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
416 {"grey89" , PALETTERGB (227, 227, 227) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
417 {"grey9" , PALETTERGB (23, 23, 23) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
418 {"grey90" , PALETTERGB (229, 229, 229) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
419 {"grey91" , PALETTERGB (232, 232, 232) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
420 {"grey92" , PALETTERGB (235, 235, 235) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
421 {"grey93" , PALETTERGB (237, 237, 237) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
422 {"grey94" , PALETTERGB (240, 240, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
423 {"grey95" , PALETTERGB (242, 242, 242) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
424 {"grey96" , PALETTERGB (245, 245, 245) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
425 {"grey97" , PALETTERGB (247, 247, 247) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
426 {"grey98" , PALETTERGB (250, 250, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
427 {"grey99" , PALETTERGB (252, 252, 252) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
428 {"honeydew" , PALETTERGB (240, 255, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
429 {"honeydew1" , PALETTERGB (240, 255, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
430 {"honeydew2" , PALETTERGB (224, 238, 224) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
431 {"honeydew3" , PALETTERGB (193, 205, 193) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
432 {"honeydew4" , PALETTERGB (131, 139, 131) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
433 {"HotPink" , PALETTERGB (255, 105, 180) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
434 {"HotPink1" , PALETTERGB (255, 110, 180) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
435 {"HotPink2" , PALETTERGB (238, 106, 167) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
436 {"HotPink3" , PALETTERGB (205, 96, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
437 {"HotPink4" , PALETTERGB (139, 58, 98) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
438 {"IndianRed" , PALETTERGB (205, 92, 92) }, |
442 | 439 {"IndianRed1" , PALETTERGB (255, 106, 106) }, |
440 {"IndianRed2" , PALETTERGB (238, 99, 99) }, | |
441 {"IndianRed3" , PALETTERGB (205, 85, 85) }, | |
442 {"IndianRed4" , PALETTERGB (139, 58, 58) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
443 {"ivory" , PALETTERGB (255, 255, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
444 {"ivory1" , PALETTERGB (255, 255, 240) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
445 {"ivory2" , PALETTERGB (240, 240, 208) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
446 {"ivory3" , PALETTERGB (205, 205, 193) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
447 {"ivory4" , PALETTERGB (139, 139, 131) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
448 {"khaki" , PALETTERGB (240, 230, 140) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
449 {"khaki1" , PALETTERGB (255, 246, 143) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
450 {"khaki2" , PALETTERGB (238, 230, 133) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
451 {"khaki3" , PALETTERGB (205, 198, 115) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
452 {"khaki4" , PALETTERGB (139, 134, 78) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
453 {"lavender" , PALETTERGB (230, 230, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
454 {"LavenderBlush" , PALETTERGB (255, 240, 245) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
455 {"LavenderBlush1" , PALETTERGB (255, 240, 245) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
456 {"LavenderBlush2" , PALETTERGB (238, 224, 229) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
457 {"LavenderBlush3" , PALETTERGB (205, 193, 197) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
458 {"LavenderBlush4" , PALETTERGB (139, 131, 134) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
459 {"LawnGreen" , PALETTERGB (124, 252, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
460 {"LemonChiffon" , PALETTERGB (255, 250, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
461 {"LemonChiffon1" , PALETTERGB (255, 250, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
462 {"LemonChiffon2" , PALETTERGB (238, 233, 191) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
463 {"LemonChiffon3" , PALETTERGB (205, 201, 165) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
464 {"LemonChiffon4" , PALETTERGB (139, 137, 112) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
465 {"LightBlue" , PALETTERGB (173, 216, 230) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
466 {"LightBlue1" , PALETTERGB (191, 239, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
467 {"LightBlue2" , PALETTERGB (178, 223, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
468 {"LightBlue3" , PALETTERGB (154, 192, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
469 {"LightBlue4" , PALETTERGB (104, 131, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
470 {"LightCoral" , PALETTERGB (240, 128, 128) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
471 {"LightCyan" , PALETTERGB (224, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
472 {"LightCyan1" , PALETTERGB (224, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
473 {"LightCyan2" , PALETTERGB (209, 238, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
474 {"LightCyan3" , PALETTERGB (180, 205, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
475 {"LightCyan4" , PALETTERGB (122, 139, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
476 {"LightGoldenrod" , PALETTERGB (238, 221, 130) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
477 {"LightGoldenrod1" , PALETTERGB (255, 236, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
478 {"LightGoldenrod2" , PALETTERGB (238, 220, 130) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
479 {"LightGoldenrod3" , PALETTERGB (205, 190, 112) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
480 {"LightGoldenrod4" , PALETTERGB (139, 129, 76) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
481 {"LightGoldenrodYellow", PALETTERGB (250, 250, 210) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
482 {"LightGray" , PALETTERGB (211, 211, 211) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
483 {"LightGreen" , PALETTERGB (144, 238, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
484 {"LightGrey" , PALETTERGB (211, 211, 211) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
485 {"LightPink" , PALETTERGB (255, 182, 193) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
486 {"LightPink1" , PALETTERGB (255, 174, 185) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
487 {"LightPink2" , PALETTERGB (238, 162, 173) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
488 {"LightPink3" , PALETTERGB (205, 140, 149) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
489 {"LightPink4" , PALETTERGB (139, 95, 101) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
490 {"LightSalmon" , PALETTERGB (255, 160, 122) }, |
442 | 491 {"LightSalmon1" , PALETTERGB (255, 160, 122) }, |
492 {"LightSalmon2" , PALETTERGB (238, 149, 114) }, | |
493 {"LightSalmon3" , PALETTERGB (205, 129, 98) }, | |
494 {"LightSalmon4" , PALETTERGB (139, 87, 66) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
495 {"LightSeaGreen" , PALETTERGB (32, 178, 170) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
496 {"LightSkyBlue" , PALETTERGB (135, 206, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
497 {"LightSkyBlue1" , PALETTERGB (176, 226, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
498 {"LightSkyBlue2" , PALETTERGB (164, 211, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
499 {"LightSkyBlue3" , PALETTERGB (141, 182, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
500 {"LightSkyBlue4" , PALETTERGB (96, 123, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
501 {"LightSlateBlue" , PALETTERGB (132, 112, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
502 {"LightSlateGray" , PALETTERGB (119, 136, 153) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
503 {"LightSlateGrey" , PALETTERGB (119, 136, 153) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
504 {"LightSteelBlue" , PALETTERGB (176, 196, 222) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
505 {"LightSteelBlue1" , PALETTERGB (202, 225, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
506 {"LightSteelBlue2" , PALETTERGB (188, 210, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
507 {"LightSteelBlue3" , PALETTERGB (162, 181, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
508 {"LightSteelBlue4" , PALETTERGB (110, 123, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
509 {"LightYellow" , PALETTERGB (255, 255, 224) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
510 {"LightYellow" , PALETTERGB (255, 255, 225) }, /* Adjusted */ |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
511 {"LightYellow1" , PALETTERGB (255, 255, 224) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
512 {"LightYellow2" , PALETTERGB (238, 238, 209) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
513 {"LightYellow3" , PALETTERGB (205, 205, 180) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
514 {"LightYellow4" , PALETTERGB (139, 139, 122) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
515 {"LimeGreen" , PALETTERGB (50, 205, 50) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
516 {"linen" , PALETTERGB (250, 240, 230) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
517 {"magenta" , PALETTERGB (255, 0, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
518 {"magenta1" , PALETTERGB (255, 0, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
519 {"magenta2" , PALETTERGB (238, 0, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
520 {"magenta3" , PALETTERGB (205, 0, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
521 {"magenta4" , PALETTERGB (139, 0, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
522 {"maroon" , PALETTERGB (176, 48, 96) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
523 {"maroon1" , PALETTERGB (255, 52, 179) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
524 {"maroon2" , PALETTERGB (238, 48, 167) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
525 {"maroon3" , PALETTERGB (205, 41, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
526 {"maroon4" , PALETTERGB (139, 28, 98) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
527 {"MediumAquamarine" , PALETTERGB (102, 205, 170) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
528 {"MediumBlue" , PALETTERGB (0, 0, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
529 {"MediumOrchid" , PALETTERGB (186, 85, 211) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
530 {"MediumOrchid1" , PALETTERGB (224, 102, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
531 {"MediumOrchid2" , PALETTERGB (209, 95, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
532 {"MediumOrchid3" , PALETTERGB (180, 82, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
533 {"MediumOrchid4" , PALETTERGB (122, 55, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
534 {"MediumPurple" , PALETTERGB (147, 112, 219) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
535 {"MediumPurple1" , PALETTERGB (171, 130, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
536 {"MediumPurple2" , PALETTERGB (159, 121, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
537 {"MediumPurple3" , PALETTERGB (137, 104, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
538 {"MediumPurple4" , PALETTERGB (93, 71, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
539 {"MediumSeaGreen" , PALETTERGB (60, 179, 113) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
540 {"MediumSlateBlue" , PALETTERGB (123, 104, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
541 {"MediumSpringGreen" , PALETTERGB (0, 250, 154) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
542 {"MediumTurquoise" , PALETTERGB (72, 209, 204) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
543 {"MediumVioletRed" , PALETTERGB (199, 21, 133) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
544 {"MidnightBlue" , PALETTERGB (25, 25, 112) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
545 {"MintCream" , PALETTERGB (245, 255, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
546 {"MistyRose" , PALETTERGB (255, 228, 225) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
547 {"MistyRose1" , PALETTERGB (255, 228, 225) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
548 {"MistyRose2" , PALETTERGB (238, 213, 210) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
549 {"MistyRose3" , PALETTERGB (205, 183, 181) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
550 {"MistyRose4" , PALETTERGB (139, 125, 123) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
551 {"moccasin" , PALETTERGB (255, 228, 181) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
552 {"NavajoWhite" , PALETTERGB (255, 222, 173) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
553 {"NavajoWhite1" , PALETTERGB (255, 222, 173) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
554 {"NavajoWhite2" , PALETTERGB (238, 207, 161) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
555 {"NavajoWhite3" , PALETTERGB (205, 179, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
556 {"NavajoWhite4" , PALETTERGB (139, 121, 94) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
557 {"navy" , PALETTERGB (0, 0, 128) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
558 {"NavyBlue" , PALETTERGB (0, 0, 128) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
559 {"OldLace" , PALETTERGB (253, 245, 230) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
560 {"OliveDrab" , PALETTERGB (107, 142, 35) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
561 {"OliveDrab1" , PALETTERGB (192, 255, 62) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
562 {"OliveDrab2" , PALETTERGB (179, 238, 58) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
563 {"OliveDrab3" , PALETTERGB (154, 205, 50) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
564 {"OliveDrab4" , PALETTERGB (105, 139, 34) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
565 {"orange" , PALETTERGB (255, 165, 0) }, |
442 | 566 {"orange1" , PALETTERGB (255, 165, 0) }, |
567 {"orange2" , PALETTERGB (238, 154, 0) }, | |
568 {"orange3" , PALETTERGB (205, 133, 0) }, | |
569 {"orange4" , PALETTERGB (139, 90, 0) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
570 {"OrangeRed" , PALETTERGB (255, 69, 0) }, |
442 | 571 {"OrangeRed1" , PALETTERGB (255, 69, 0) }, |
572 {"OrangeRed2" , PALETTERGB (238, 64, 0) }, | |
573 {"OrangeRed3" , PALETTERGB (205, 55, 0) }, | |
574 {"OrangeRed4" , PALETTERGB (139, 37, 0) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
575 {"orchid" , PALETTERGB (218, 112, 214) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
576 {"orchid1" , PALETTERGB (255, 131, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
577 {"orchid2" , PALETTERGB (238, 122, 233) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
578 {"orchid3" , PALETTERGB (205, 105, 201) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
579 {"orchid4" , PALETTERGB (139, 71, 137) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
580 {"PaleGoldenrod" , PALETTERGB (238, 232, 170) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
581 {"PaleGreen" , PALETTERGB (152, 251, 152) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
582 {"PaleGreen1" , PALETTERGB (154, 255, 154) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
583 {"PaleGreen2" , PALETTERGB (144, 238, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
584 {"PaleGreen3" , PALETTERGB (124, 205, 124) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
585 {"PaleGreen4" , PALETTERGB (84, 139, 84) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
586 {"PaleTurquoise" , PALETTERGB (175, 238, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
587 {"PaleTurquoise1" , PALETTERGB (187, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
588 {"PaleTurquoise2" , PALETTERGB (174, 238, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
589 {"PaleTurquoise3" , PALETTERGB (150, 205, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
590 {"PaleTurquoise4" , PALETTERGB (102, 139, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
591 {"PaleVioletRed" , PALETTERGB (219, 112, 147) }, |
442 | 592 {"PaleVioletRed1" , PALETTERGB (255, 130, 171) }, |
593 {"PaleVioletRed2" , PALETTERGB (238, 121, 159) }, | |
594 {"PaleVioletRed3" , PALETTERGB (205, 104, 137) }, | |
595 {"PaleVioletRed4" , PALETTERGB (139, 71, 93) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
596 {"PaleYellow" , PALETTERGB (255, 255, 128) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
597 {"PapayaWhip" , PALETTERGB (255, 239, 213) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
598 {"PeachPuff" , PALETTERGB (255, 218, 185) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
599 {"PeachPuff1" , PALETTERGB (255, 218, 185) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
600 {"PeachPuff2" , PALETTERGB (238, 203, 173) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
601 {"PeachPuff3" , PALETTERGB (205, 175, 149) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
602 {"PeachPuff4" , PALETTERGB (139, 119, 101) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
603 {"peru" , PALETTERGB (205, 133, 63) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
604 {"pink" , PALETTERGB (255, 192, 203) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
605 {"pink1" , PALETTERGB (255, 181, 197) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
606 {"pink2" , PALETTERGB (238, 169, 184) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
607 {"pink3" , PALETTERGB (205, 145, 158) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
608 {"pink4" , PALETTERGB (139, 99, 108) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
609 {"plum" , PALETTERGB (221, 160, 221) }, |
442 | 610 {"plum1" , PALETTERGB (255, 187, 255) }, |
611 {"plum2" , PALETTERGB (238, 174, 238) }, | |
612 {"plum3" , PALETTERGB (205, 150, 205) }, | |
613 {"plum4" , PALETTERGB (139, 102, 139) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
614 {"PowderBlue" , PALETTERGB (176, 224, 230) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
615 {"purple" , PALETTERGB (160, 32, 240) }, |
442 | 616 {"purple1" , PALETTERGB (155, 48, 255) }, |
617 {"purple2" , PALETTERGB (145, 44, 238) }, | |
618 {"purple3" , PALETTERGB (125, 38, 205) }, | |
619 {"purple4" , PALETTERGB (85, 26, 139) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
620 {"red" , PALETTERGB (255, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
621 {"red1" , PALETTERGB (255, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
622 {"red2" , PALETTERGB (238, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
623 {"red3" , PALETTERGB (205, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
624 {"red4" , PALETTERGB (139, 0, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
625 {"RosyBrown" , PALETTERGB (188, 143, 143) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
626 {"RosyBrown1" , PALETTERGB (255, 193, 193) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
627 {"RosyBrown2" , PALETTERGB (238, 180, 180) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
628 {"RosyBrown3" , PALETTERGB (205, 155, 155) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
629 {"RosyBrown4" , PALETTERGB (139, 105, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
630 {"RoyalBlue" , PALETTERGB (65, 105, 225) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
631 {"RoyalBlue1" , PALETTERGB (72, 118, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
632 {"RoyalBlue2" , PALETTERGB (67, 110, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
633 {"RoyalBlue3" , PALETTERGB (58, 95, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
634 {"RoyalBlue4" , PALETTERGB (39, 64, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
635 {"SaddleBrown" , PALETTERGB (139, 69, 19) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
636 {"salmon" , PALETTERGB (250, 128, 114) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
637 {"salmon1" , PALETTERGB (255, 140, 105) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
638 {"salmon2" , PALETTERGB (238, 130, 98) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
639 {"salmon3" , PALETTERGB (205, 112, 84) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
640 {"salmon4" , PALETTERGB (139, 76, 57) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
641 {"SandyBrown" , PALETTERGB (244, 164, 96) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
642 {"SeaGreen" , PALETTERGB (46, 139, 87) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
643 {"SeaGreen1" , PALETTERGB (84, 255, 159) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
644 {"SeaGreen2" , PALETTERGB (78, 238, 148) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
645 {"SeaGreen3" , PALETTERGB (67, 205, 128) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
646 {"SeaGreen4" , PALETTERGB (46, 139, 87) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
647 {"seashell" , PALETTERGB (255, 245, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
648 {"seashell1" , PALETTERGB (255, 245, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
649 {"seashell2" , PALETTERGB (238, 229, 222) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
650 {"seashell3" , PALETTERGB (205, 197, 191) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
651 {"seashell4" , PALETTERGB (139, 134, 130) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
652 {"sienna" , PALETTERGB (160, 82, 45) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
653 {"sienna1" , PALETTERGB (255, 130, 71) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
654 {"sienna2" , PALETTERGB (238, 121, 66) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
655 {"sienna3" , PALETTERGB (205, 104, 57) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
656 {"sienna4" , PALETTERGB (139, 71, 38) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
657 {"SkyBlue" , PALETTERGB (135, 206, 235) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
658 {"SkyBlue1" , PALETTERGB (135, 206, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
659 {"SkyBlue2" , PALETTERGB (126, 192, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
660 {"SkyBlue3" , PALETTERGB (108, 166, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
661 {"SkyBlue4" , PALETTERGB (74, 112, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
662 {"SlateBlue" , PALETTERGB (106, 90, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
663 {"SlateBlue1" , PALETTERGB (131, 111, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
664 {"SlateBlue2" , PALETTERGB (122, 103, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
665 {"SlateBlue3" , PALETTERGB (105, 89, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
666 {"SlateBlue4" , PALETTERGB (71, 60, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
667 {"SlateGray" , PALETTERGB (112, 128, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
668 {"SlateGray1" , PALETTERGB (198, 226, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
669 {"SlateGray2" , PALETTERGB (185, 211, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
670 {"SlateGray3" , PALETTERGB (159, 182, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
671 {"SlateGray4" , PALETTERGB (108, 123, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
672 {"SlateGrey" , PALETTERGB (112, 128, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
673 {"snow" , PALETTERGB (255, 250, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
674 {"snow1" , PALETTERGB (255, 250, 250) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
675 {"snow2" , PALETTERGB (238, 233, 233) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
676 {"snow3" , PALETTERGB (205, 201, 201) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
677 {"snow4" , PALETTERGB (139, 137, 137) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
678 {"SpringGreen" , PALETTERGB (0, 255, 127) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
679 {"SpringGreen1" , PALETTERGB (0, 255, 127) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
680 {"SpringGreen2" , PALETTERGB (0, 238, 118) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
681 {"SpringGreen3" , PALETTERGB (0, 205, 102) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
682 {"SpringGreen4" , PALETTERGB (0, 139, 69) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
683 {"SteelBlue" , PALETTERGB (70, 130, 180) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
684 {"SteelBlue1" , PALETTERGB (99, 184, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
685 {"SteelBlue2" , PALETTERGB (92, 172, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
686 {"SteelBlue3" , PALETTERGB (79, 148, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
687 {"SteelBlue4" , PALETTERGB (54, 100, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
688 {"tan" , PALETTERGB (210, 180, 140) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
689 {"tan1" , PALETTERGB (255, 165, 79) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
690 {"tan2" , PALETTERGB (238, 154, 73) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
691 {"tan3" , PALETTERGB (205, 133, 63) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
692 {"tan4" , PALETTERGB (139, 90, 43) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
693 {"thistle" , PALETTERGB (216, 191, 216) }, |
442 | 694 {"thistle1" , PALETTERGB (255, 225, 255) }, |
695 {"thistle2" , PALETTERGB (238, 210, 238) }, | |
696 {"thistle3" , PALETTERGB (205, 181, 205) }, | |
697 {"thistle4" , PALETTERGB (139, 123, 139) }, | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
698 {"tomato" , PALETTERGB (255, 99, 71) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
699 {"tomato1" , PALETTERGB (255, 99, 71) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
700 {"tomato2" , PALETTERGB (238, 92, 66) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
701 {"tomato3" , PALETTERGB (205, 79, 57) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
702 {"tomato4" , PALETTERGB (139, 54, 38) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
703 {"turquoise" , PALETTERGB (64, 224, 208) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
704 {"turquoise1" , PALETTERGB (0, 245, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
705 {"turquoise2" , PALETTERGB (0, 229, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
706 {"turquoise3" , PALETTERGB (0, 197, 205) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
707 {"turquoise4" , PALETTERGB (0, 134, 139) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
708 {"violet" , PALETTERGB (238, 130, 238) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
709 {"VioletRed" , PALETTERGB (208, 32, 144) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
710 {"VioletRed1" , PALETTERGB (255, 62, 150) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
711 {"VioletRed2" , PALETTERGB (238, 58, 140) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
712 {"VioletRed3" , PALETTERGB (205, 50, 120) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
713 {"VioletRed4" , PALETTERGB (139, 34, 82) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
714 {"wheat" , PALETTERGB (245, 222, 179) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
715 {"wheat1" , PALETTERGB (255, 231, 186) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
716 {"wheat2" , PALETTERGB (238, 216, 174) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
717 {"wheat3" , PALETTERGB (205, 186, 150) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
718 {"wheat4" , PALETTERGB (139, 126, 102) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
719 {"white" , PALETTERGB (255, 255, 255) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
720 {"WhiteSmoke" , PALETTERGB (245, 245, 245) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
721 {"yellow" , PALETTERGB (255, 255, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
722 {"yellow1" , PALETTERGB (255, 255, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
723 {"yellow2" , PALETTERGB (238, 238, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
724 {"yellow3" , PALETTERGB (205, 205, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
725 {"yellow4" , PALETTERGB (139, 139, 0) }, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
726 {"YellowGreen" , PALETTERGB (154, 205, 50) } |
428 | 727 }; |
728 | |
729 | |
442 | 730 typedef struct fontmap_t |
428 | 731 { |
2367 | 732 const Ascbyte *name; |
442 | 733 int value; |
428 | 734 } fontmap_t; |
735 | |
736 /* Default weight first, preferred names listed before synonyms */ | |
442 | 737 static const fontmap_t fontweight_map[] = |
428 | 738 { |
739 {"Regular" , FW_REGULAR}, /* The standard font weight */ | |
740 {"Thin" , FW_THIN}, | |
741 {"Extra Light" , FW_EXTRALIGHT}, | |
742 {"Ultra Light" , FW_ULTRALIGHT}, | |
743 {"Light" , FW_LIGHT}, | |
744 {"Normal" , FW_NORMAL}, | |
745 {"Medium" , FW_MEDIUM}, | |
746 {"Semi Bold" , FW_SEMIBOLD}, | |
747 {"Demi Bold" , FW_DEMIBOLD}, | |
748 {"Bold" , FW_BOLD}, /* The standard bold font weight */ | |
749 {"Extra Bold" , FW_EXTRABOLD}, | |
750 {"Ultra Bold" , FW_ULTRABOLD}, | |
751 {"Heavy" , FW_HEAVY}, | |
752 {"Black" , FW_BLACK} | |
753 }; | |
754 | |
872 | 755 /* Default charset must be listed first, no synonyms allowed because these |
756 * names are matched against the names reported by win32 by match_font() */ | |
442 | 757 static const fontmap_t charset_map[] = |
428 | 758 { |
771 | 759 {"Western" , ANSI_CHARSET}, /* Latin 1 */ |
760 {"Central European" , EASTEUROPE_CHARSET}, | |
761 {"Cyrillic" , RUSSIAN_CHARSET}, | |
428 | 762 {"Greek" , GREEK_CHARSET}, |
763 {"Turkish" , TURKISH_CHARSET}, | |
771 | 764 {"Hebrew" , HEBREW_CHARSET}, |
765 {"Arabic" , ARABIC_CHARSET}, | |
766 {"Baltic" , BALTIC_CHARSET}, | |
767 {"Viet Nam" , VIETNAMESE_CHARSET}, | |
768 {"Thai" , THAI_CHARSET}, | |
769 {"Japanese" , SHIFTJIS_CHARSET}, | |
770 {"Korean" , HANGEUL_CHARSET}, | |
771 {"Simplified Chinese" , GB2312_CHARSET}, | |
772 {"Traditional Chinese", CHINESEBIG5_CHARSET}, | |
773 | |
774 {"Symbol" , SYMBOL_CHARSET}, | |
428 | 775 {"Mac" , MAC_CHARSET}, |
771 | 776 {"Korean Johab" , JOHAB_CHARSET}, |
428 | 777 {"OEM/DOS" , OEM_CHARSET} |
778 }; | |
779 | |
788 | 780 #ifdef MULE |
781 | |
782 typedef struct unicode_subrange_raw_t | |
783 { | |
784 int subrange_bit; | |
785 int start; /* first Unicode codepoint */ | |
786 int end; /* last Unicode codepoint */ | |
787 } unicode_subrange_raw_t; | |
788 | |
789 /* This table comes from MSDN, Unicode Subset Bitfields [Platform SDK | |
790 Documentation, Base Services, International Features, Unicode and | |
791 Character Sets, Unicode and Character Set Reference, Unicode and | |
792 Character Set Constants]. We preprocess it at startup time into an | |
793 array of unicode_subrange_t. | |
794 */ | |
795 | |
796 static const unicode_subrange_raw_t unicode_subrange_raw_map[] = | |
797 { | |
798 {0, 0x0020, 0x007e}, /* Basic Latin */ | |
799 {1, 0x00a0, 0x00ff}, /* Latin-1 Supplement */ | |
800 {2, 0x0100, 0x017f}, /* Latin Extended-A */ | |
801 {3, 0x0180, 0x024f}, /* Latin Extended-B */ | |
802 {4, 0x0250, 0x02af}, /* IPA Extensions */ | |
803 {5, 0x02b0, 0x02ff}, /* Spacing Modifier Letters */ | |
804 {6, 0x0300, 0x036f}, /* Combining Diacritical Marks */ | |
805 {7, 0x0370, 0x03ff}, /* Basic Greek */ | |
806 /* 8 Reserved */ | |
807 {9, 0x0400, 0x04ff}, /* Cyrillic */ | |
808 {10, 0x0530, 0x058f}, /* Armenian */ | |
809 {11, 0x0590, 0x05ff}, /* Basic Hebrew */ | |
810 /* 12 Reserved */ | |
811 {13, 0x0600, 0x06ff}, /* Basic Arabic */ | |
812 /* 14 Reserved */ | |
813 {15, 0x0900, 0x097f}, /* Devanagari */ | |
814 {16, 0x0980, 0x09ff}, /* Bengali */ | |
815 {17, 0x0a00, 0x0a7f}, /* Gurmukhi */ | |
816 {18, 0x0a80, 0x0aff}, /* Gujarati */ | |
817 {19, 0x0b00, 0x0b7f}, /* Oriya */ | |
818 {20, 0x0b80, 0x0bff}, /* Tamil */ | |
819 {21, 0x0c00, 0x0c7f}, /* Telugu */ | |
820 {22, 0x0c80, 0x0cff}, /* Kannada */ | |
821 {23, 0x0d00, 0x0d7f}, /* Malayalam */ | |
822 {24, 0x0e00, 0x0e7f}, /* Thai */ | |
823 {25, 0x0e80, 0x0eff}, /* Lao */ | |
824 {26, 0x10a0, 0x10ff}, /* Basic Georgian */ | |
825 /* 27 Reserved */ | |
826 {28, 0x1100, 0x11ff}, /* Hangul Jamo */ | |
827 {29, 0x1e00, 0x1eff}, /* Latin Extended Additional */ | |
828 {30, 0x1f00, 0x1fff}, /* Greek Extended */ | |
829 {31, 0x2000, 0x206f}, /* General Punctuation */ | |
830 {32, 0x2070, 0x209f}, /* Subscripts and Superscripts */ | |
831 {33, 0x20a0, 0x20cf}, /* Currency Symbols */ | |
832 {34, 0x20d0, 0x20ff}, /* Combining Diacritical Marks for Symbols */ | |
833 {35, 0x2100, 0x214f}, /* Letter-like Symbols */ | |
834 {36, 0x2150, 0x218f}, /* Number Forms */ | |
835 {37, 0x2190, 0x21ff}, /* Arrows */ | |
836 {38, 0x2200, 0x22ff}, /* Mathematical Operators */ | |
837 {39, 0x2300, 0x23ff}, /* Miscellaneous Technical */ | |
838 {40, 0x2400, 0x243f}, /* Control Pictures */ | |
839 {41, 0x2440, 0x245f}, /* Optical Character Recognition */ | |
840 {42, 0x2460, 0x24ff}, /* Enclosed Alphanumerics */ | |
841 {43, 0x2500, 0x257f}, /* Box Drawing */ | |
842 {44, 0x2580, 0x259f}, /* Block Elements */ | |
843 {45, 0x25a0, 0x25ff}, /* Geometric Shapes */ | |
844 {46, 0x2600, 0x26ff}, /* Miscellaneous Symbols */ | |
845 {47, 0x2700, 0x27bf}, /* Dingbats */ | |
846 {48, 0x3000, 0x303f}, /* Chinese, Japanese, and Korean (CJK) Symbols and Punctuation */ | |
847 {49, 0x3040, 0x309f}, /* Hiragana */ | |
848 {50, 0x30a0, 0x30ff}, /* Katakana */ | |
849 {51, 0x3100, 0x312f}, /* Bopomofo */ | |
850 {51, 0x31a0, 0x31bf}, /* Extended Bopomofo */ | |
851 {52, 0x3130, 0x318f}, /* Hangul Compatibility Jamo */ | |
852 {53, 0x3190, 0x319f}, /* CJK Miscellaneous */ | |
853 {54, 0x3200, 0x32ff}, /* Enclosed CJK Letters and Months */ | |
854 {55, 0x3300, 0x33ff}, /* CJK Compatibility */ | |
855 {56, 0xac00, 0xd7a3}, /* Hangul */ | |
856 {57, 0xd800, 0xdfff}, /* Surrogates. Note that setting this bit implies that there is at least one codepoint beyond the Basic Multilingual Plane that is supported by this font. */ | |
857 /* 58 Reserved */ | |
858 {59, 0x4e00, 0x9fff}, /* CJK Unified Ideographs */ | |
859 {59, 0x2e80, 0x2eff}, /* CJK Radicals Supplement */ | |
860 {59, 0x2f00, 0x2fdf}, /* Kangxi Radicals */ | |
861 {59, 0x2ff0, 0x2fff}, /* Ideographic Description */ | |
862 {59, 0x3400, 0x4dbf}, /* CJK Unified Ideograph Extension A */ | |
863 {60, 0xe000, 0xf8ff}, /* Private Use Area */ | |
864 {61, 0xf900, 0xfaff}, /* CJK Compatibility Ideographs */ | |
865 {62, 0xfb00, 0xfb4f}, /* Alphabetic Presentation Forms */ | |
866 {63, 0xfb50, 0xfdff}, /* Arabic Presentation Forms-A */ | |
867 {64, 0xfe20, 0xfe2f}, /* Combining Half Marks */ | |
868 {65, 0xfe30, 0xfe4f}, /* CJK Compatibility Forms */ | |
869 {66, 0xfe50, 0xfe6f}, /* Small Form Variants */ | |
870 {67, 0xfe70, 0xfefe}, /* Arabic Presentation Forms-B */ | |
871 {68, 0xff00, 0xffef}, /* Halfwidth and Fullwidth Forms */ | |
872 {69, 0xfff0, 0xfffd}, /* Specials */ | |
873 {70, 0x0f00, 0x0fcf}, /* Tibetan */ | |
874 {71, 0x0700, 0x074f}, /* Syriac */ | |
875 {72, 0x0780, 0x07bf}, /* Thaana */ | |
876 {73, 0x0d80, 0x0dff}, /* Sinhala */ | |
877 {74, 0x1000, 0x109f}, /* Myanmar */ | |
878 {75, 0x1200, 0x12bf}, /* Ethiopic */ | |
879 {76, 0x13a0, 0x13ff}, /* Cherokee */ | |
880 {77, 0x1400, 0x14df}, /* Canadian Aboriginal Syllabics */ | |
881 {78, 0x1680, 0x169f}, /* Ogham */ | |
882 {79, 0x16a0, 0x16ff}, /* Runic */ | |
883 {80, 0x1780, 0x17ff}, /* Khmer */ | |
884 {81, 0x1800, 0x18af}, /* Mongolian */ | |
885 {82, 0x2800, 0x28ff}, /* Braille */ | |
886 {83, 0xa000, 0xa48c}, /* Yi, Yi Radicals */ | |
887 /* 84-122 Reserved */ | |
888 /* 123 Windows 2000/XP: Layout progress: horizontal from right to left */ | |
889 /* 124 Windows 2000/XP: Layout progress: vertical before horizontal */ | |
890 /* 125 Windows 2000/XP: Layout progress: vertical bottom to top */ | |
891 /* 126 Reserved; must be 0 */ | |
892 /* 127 Reserved; must be 1 */ | |
893 }; | |
894 | |
895 typedef struct unicode_subrange_t | |
896 { | |
897 int no_subranges; | |
898 const unicode_subrange_raw_t *subranges; | |
899 } unicode_subrange_t; | |
900 | |
901 unicode_subrange_t *unicode_subrange_table; | |
902 | |
903 /* Hash table mapping font specs (strings) to font signature data | |
904 (FONTSIGNATURE structures stored in opaques), as determined by | |
905 GetTextCharsetInfo(). I presume this is somewhat expensive because it | |
906 involves creating a font object. At the very least, with no hashing, it | |
907 definitely took awhile (a few seconds) when encountering characters from | |
908 charsets needing stage 2 processing. */ | |
909 Lisp_Object Vfont_signature_data; | |
910 | |
911 #endif /* MULE */ | |
912 | |
428 | 913 |
914 /************************************************************************/ | |
915 /* helpers */ | |
916 /************************************************************************/ | |
917 | |
918 static int | |
867 | 919 hexval (Ibyte c) |
428 | 920 { |
771 | 921 /* assumes ASCII and isxdigit (c) */ |
428 | 922 if (c >= 'a') |
771 | 923 return c - 'a' + 10; |
428 | 924 else if (c >= 'A') |
771 | 925 return c - 'A' + 10; |
428 | 926 else |
771 | 927 return c - '0'; |
428 | 928 } |
929 | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
930 static int |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
931 colormap_t_compare (const void *a, const void *b) |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
932 { |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
933 return ascii_strcasecmp (((colormap_t *)a)->name, |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
934 ((colormap_t *)b)->name); |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
935 } |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
936 |
428 | 937 COLORREF |
867 | 938 mswindows_string_to_color (const Ibyte *name) |
428 | 939 { |
940 int i; | |
941 | |
942 if (*name == '#') | |
943 { | |
944 /* numeric names look like "#RRGGBB", "#RRRGGGBBB" or "#RRRRGGGGBBBB" | |
945 or "rgb:rrrr/gggg/bbbb" */ | |
946 unsigned int r, g, b; | |
442 | 947 |
771 | 948 for (i = 1; i < qxestrlen (name); i++) |
428 | 949 { |
826 | 950 if (!byte_ascii_p (name[i]) || !isxdigit ((int) name[i])) |
428 | 951 return (COLORREF) -1; |
952 } | |
771 | 953 if (qxestrlen (name) == 7) |
428 | 954 { |
955 r = hexval (name[1]) * 16 + hexval (name[2]); | |
956 g = hexval (name[3]) * 16 + hexval (name[4]); | |
957 b = hexval (name[5]) * 16 + hexval (name[6]); | |
958 return (PALETTERGB (r, g, b)); | |
959 } | |
771 | 960 else if (qxestrlen (name) == 10) |
428 | 961 { |
962 r = hexval (name[1]) * 16 + hexval (name[2]); | |
963 g = hexval (name[4]) * 16 + hexval (name[5]); | |
964 b = hexval (name[7]) * 16 + hexval (name[8]); | |
965 return (PALETTERGB (r, g, b)); | |
966 } | |
771 | 967 else if (qxestrlen (name) == 13) |
428 | 968 { |
969 r = hexval (name[1]) * 16 + hexval (name[2]); | |
970 g = hexval (name[5]) * 16 + hexval (name[6]); | |
971 b = hexval (name[9]) * 16 + hexval (name[10]); | |
972 return (PALETTERGB (r, g, b)); | |
973 } | |
974 } | |
2367 | 975 else if (!qxestrncmp_ascii (name, "rgb:", 4)) |
428 | 976 { |
771 | 977 unsigned int r, g, b; |
428 | 978 |
867 | 979 if (sscanf ((CIbyte *) name, "rgb:%04x/%04x/%04x", &r, &g, &b) == 3) |
428 | 980 { |
771 | 981 int len = qxestrlen (name); |
428 | 982 if (len == 18) |
983 { | |
984 r /= 257; | |
985 g /= 257; | |
986 b /= 257; | |
987 } | |
988 else if (len == 15) | |
989 { | |
990 r /= 17; | |
991 g /= 17; | |
992 b /= 17; | |
993 } | |
994 return (PALETTERGB (r, g, b)); | |
995 } | |
442 | 996 else |
428 | 997 return (COLORREF) -1; |
998 } | |
999 else if (*name) /* Can't be an empty string */ | |
1000 { | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1001 colormap_t key = { alloca_ascbytes (qxestrlen (name) + 1), |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1002 PALETTERGB (255, 255, 255) }, *res; |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1003 Ascbyte *c = (Ascbyte *)(key.name); |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1004 |
428 | 1005 while (*name) |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1006 { |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1007 if (*name != ' ') |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1008 { |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1009 if (!byte_ascii_p (*name)) |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1010 { |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1011 return (COLORREF) -1; |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1012 } |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1013 |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1014 *c++ = *name++; |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1015 } |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1016 else |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1017 { |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1018 name++; |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1019 } |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1020 } |
428 | 1021 *c = '\0'; |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1022 |
5256
6c8f5574d4a1
Fix the C++, Visual Studio 2005 builds.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5218
diff
changeset
|
1023 if ((res = (colormap_t *) bsearch (&key, mswindows_X_color_map, |
6c8f5574d4a1
Fix the C++, Visual Studio 2005 builds.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5218
diff
changeset
|
1024 countof (mswindows_X_color_map), |
6c8f5574d4a1
Fix the C++, Visual Studio 2005 builds.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5218
diff
changeset
|
1025 sizeof (mswindows_X_color_map[0]), |
6c8f5574d4a1
Fix the C++, Visual Studio 2005 builds.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5218
diff
changeset
|
1026 colormap_t_compare)) != NULL) |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1027 { |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1028 return res->colorref; |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
1029 } |
428 | 1030 } |
1031 return (COLORREF) -1; | |
1032 } | |
1033 | |
442 | 1034 Lisp_Object |
1035 mswindows_color_to_string (COLORREF color) | |
1036 { | |
1037 int i; | |
2367 | 1038 Ascbyte buf[8]; |
442 | 1039 COLORREF pcolor = PALETTERGB (GetRValue (color), GetGValue (color), |
1040 GetBValue (color)); | |
1041 | |
771 | 1042 for (i = 0; i < countof (mswindows_X_color_map); i++) |
442 | 1043 if (pcolor == (mswindows_X_color_map[i].colorref)) |
4952
19a72041c5ed
Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents:
4932
diff
changeset
|
1044 return build_ascstring (mswindows_X_color_map[i].name); |
442 | 1045 |
1046 sprintf (buf, "#%02X%02X%02X", | |
1047 GetRValue (color), GetGValue (color), GetBValue (color)); | |
4952
19a72041c5ed
Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents:
4932
diff
changeset
|
1048 return build_ascstring (buf); |
442 | 1049 } |
1050 | |
428 | 1051 /* |
1052 * Returns non-zero if the two supplied font patterns match. | |
1053 * If they match and fontname is not NULL, copies the logical OR of the | |
1054 * patterns to fontname (which is assumed to be at least MSW_FONTSIZE in size). | |
1055 * | |
1056 * The patterns 'match' iff for each field that is not blank in either pattern, | |
1057 * the corresponding field in the other pattern is either identical or blank. | |
1058 */ | |
1059 static int | |
867 | 1060 match_font (Ibyte *pattern1, Ibyte *pattern2, |
1061 Ibyte *fontname) | |
428 | 1062 { |
867 | 1063 Ibyte *c1 = pattern1, *c2 = pattern2, *e1 = 0, *e2 = 0; |
428 | 1064 int i; |
1065 | |
1066 if (fontname) | |
1067 fontname[0] = '\0'; | |
1068 | |
771 | 1069 for (i = 0; i < 5; i++) |
428 | 1070 { |
771 | 1071 if (c1 && (e1 = qxestrchr (c1, ':'))) |
428 | 1072 *(e1) = '\0'; |
771 | 1073 if (c2 && (e2 = qxestrchr (c2, ':'))) |
428 | 1074 *(e2) = '\0'; |
1075 | |
771 | 1076 if (c1 && c1[0] != '\0') |
428 | 1077 { |
771 | 1078 if (c2 && c2[0] != '\0' && qxestrcasecmp (c1, c2)) |
428 | 1079 { |
1080 if (e1) *e1 = ':'; | |
1081 if (e2) *e2 = ':'; | |
1082 return 0; | |
1083 } | |
1084 else if (fontname) | |
2367 | 1085 qxestrcat_ascii (qxestrcat (fontname, c1), ":"); |
428 | 1086 } |
1087 else if (fontname) | |
1088 { | |
771 | 1089 if (c2 && c2[0] != '\0') |
2367 | 1090 qxestrcat_ascii (qxestrcat (fontname, c2), ":"); |
428 | 1091 else |
2367 | 1092 qxestrcat_ascii (fontname, ":"); |
428 | 1093 } |
1094 | |
1095 if (e1) *(e1++) = ':'; | |
1096 if (e2) *(e2++) = ':'; | |
771 | 1097 c1 = e1; |
1098 c2 = e2; | |
428 | 1099 } |
1100 | |
1101 if (fontname) | |
771 | 1102 fontname[qxestrlen (fontname) - 1] = '\0'; /* Trim trailing ':' */ |
428 | 1103 return 1; |
1104 } | |
1105 | |
1106 | |
1107 /************************************************************************/ | |
1108 /* exports */ | |
1109 /************************************************************************/ | |
1110 | |
1111 struct font_enum_t | |
1112 { | |
1113 HDC hdc; | |
440 | 1114 Lisp_Object list; |
428 | 1115 }; |
1116 | |
1117 static int CALLBACK | |
771 | 1118 font_enum_callback_2 (ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, |
1119 int FontType, struct font_enum_t *font_enum) | |
442 | 1120 { |
867 | 1121 Ibyte fontname[MSW_FONTSIZE * 2 * MAX_ICHAR_LEN]; /* should be enough :)*/ |
442 | 1122 Lisp_Object fontname_lispstr; |
1123 int i; | |
867 | 1124 Ibyte *facename; |
428 | 1125 |
1126 /* | |
1127 * The enumerated font weights are not to be trusted because: | |
1128 * a) lpelfe->elfStyle is only filled in for TrueType fonts. | |
442 | 1129 * b) Not all Bold and Italic styles of all fonts (including some Vector, |
428 | 1130 * Truetype and Raster fonts) are enumerated. |
1131 * I guess that fonts for which Bold and Italic styles are generated | |
1132 * 'on-the-fly' are not enumerated. It would be overly restrictive to | |
1133 * disallow Bold And Italic weights for these fonts, so we just leave | |
1134 * weights unspecified. This means that we have to weed out duplicates of | |
1135 * those fonts that do get enumerated with different weights. | |
1136 */ | |
4981
4aebb0131297
Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
1137 facename = TSTR_TO_ITEXT (lpelfe->elfLogFont.lfFaceName); |
867 | 1138 if (itext_ichar (facename) == '@') |
771 | 1139 /* This is a font for writing vertically. We ignore it. */ |
1140 return 1; | |
1141 | |
1142 if (FontType == 0 /*vector*/ || FontType & TRUETYPE_FONTTYPE) | |
428 | 1143 /* Scalable, so leave pointsize blank */ |
771 | 1144 qxesprintf (fontname, "%s::::", facename); |
428 | 1145 else |
1146 /* Formula for pointsize->height from LOGFONT docs in Platform SDK */ | |
771 | 1147 qxesprintf (fontname, "%s::%d::", facename, |
1148 MulDiv (lpntme->ntmTm.tmHeight - | |
1149 lpntme->ntmTm.tmInternalLeading, | |
1150 72, GetDeviceCaps (font_enum->hdc, LOGPIXELSY))); | |
428 | 1151 |
1152 /* | |
1153 * The enumerated font character set strings are not to be trusted because | |
1154 * lpelfe->elfScript is returned in the host language and not in English. | |
1155 * We can't know a priori the translations of "Western", "Central European" | |
1156 * etc into the host language, so we must use English. The same argument | |
1157 * applies to the font weight string when matching fonts. | |
1158 */ | |
771 | 1159 for (i = 0; i < countof (charset_map); i++) |
428 | 1160 if (lpelfe->elfLogFont.lfCharSet == charset_map[i].value) |
1161 { | |
2367 | 1162 qxestrcat_ascii (fontname, charset_map[i].name); |
428 | 1163 break; |
1164 } | |
771 | 1165 if (i == countof (charset_map)) |
1166 return 1; | |
428 | 1167 |
440 | 1168 /* Add the font name to the list if not already there */ |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4952
diff
changeset
|
1169 fontname_lispstr = build_istring (fontname); |
872 | 1170 if (NILP (Fassoc (fontname_lispstr, font_enum->list))) |
1171 font_enum->list = | |
1172 Fcons (Fcons (fontname_lispstr, | |
1173 /* TMPF_FIXED_PITCH is backwards from what you expect! | |
1174 If set, it means NOT fixed pitch. */ | |
1175 (lpntme->ntmTm.tmPitchAndFamily & TMPF_FIXED_PITCH) ? | |
1176 Qnil : Qt), | |
1177 font_enum->list); | |
428 | 1178 |
1179 return 1; | |
1180 } | |
1181 | |
1182 static int CALLBACK | |
2286 | 1183 font_enum_callback_1 (ENUMLOGFONTEXW *lpelfe, |
1184 NEWTEXTMETRICEXW *UNUSED (lpntme), | |
1185 int UNUSED (FontType), struct font_enum_t *font_enum) | |
428 | 1186 { |
1187 /* This function gets called once per facename per character set. | |
1188 * We call a second callback to enumerate the fonts in each facename */ | |
771 | 1189 return qxeEnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont, |
1190 (FONTENUMPROCW) font_enum_callback_2, | |
1191 (LPARAM) font_enum, 0); | |
428 | 1192 } |
1193 | |
872 | 1194 /* Function for sorting lists of fonts as obtained from |
1195 mswindows_enumerate_fonts(). These come in a known format: | |
1196 "family::::charset" for TrueType fonts, "family::size::charset" | |
1197 otherwise. */ | |
1198 | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1199 static Boolint |
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1200 sort_font_list_function (Lisp_Object UNUSED (pred), Lisp_Object UNUSED (key), |
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1201 Lisp_Object obj1, Lisp_Object obj2) |
872 | 1202 { |
1203 Ibyte *font1, *font2; | |
1204 Ibyte *c1, *c2; | |
1205 int t1, t2; | |
1206 | |
1207 /* | |
1208 1. fixed over proportional. | |
1209 2. Western over other charsets. | |
1210 3. TrueType over non-TrueType. | |
1211 4. Within non-TrueType, sizes closer to 10pt over sizes farther from 10pt. | |
1212 5. Courier New over other families. | |
1213 */ | |
1214 | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1215 /* The sort function should return non-zero if OBJ1 < OBJ2, zero |
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1216 otherwise. */ |
872 | 1217 |
1218 t1 = !NILP (XCDR (obj1)); | |
1219 t2 = !NILP (XCDR (obj2)); | |
1220 | |
1221 if (t1 && !t2) | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1222 return 1; |
872 | 1223 if (t2 && !t1) |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1224 return 0; |
872 | 1225 |
1226 font1 = XSTRING_DATA (XCAR (obj1)); | |
1227 font2 = XSTRING_DATA (XCAR (obj2)); | |
1228 | |
1229 c1 = qxestrrchr (font1, ':'); | |
1230 c2 = qxestrrchr (font2, ':'); | |
1231 | |
2367 | 1232 t1 = !qxestrcasecmp_ascii (c1 + 1, "western"); |
1233 t2 = !qxestrcasecmp_ascii (c2 + 1, "western"); | |
872 | 1234 |
1235 if (t1 && !t2) | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1236 return 1; |
872 | 1237 if (t2 && !t1) |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1238 return 0; |
872 | 1239 |
1240 c1 -= 2; | |
1241 c2 -= 2; | |
1242 t1 = *c1 == ':'; | |
1243 t2 = *c2 == ':'; | |
1244 | |
1245 if (t1 && !t2) | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1246 return 1; |
872 | 1247 if (t2 && !t1) |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1248 return 0; |
872 | 1249 |
1250 if (!t1 && !t2) | |
1251 { | |
1252 while (isdigit (*c1)) | |
1253 c1--; | |
1254 while (isdigit (*c2)) | |
1255 c2--; | |
1256 | |
1257 t1 = qxeatoi (c1 + 1) - 10; | |
1258 t2 = qxeatoi (c2 + 1) - 10; | |
1259 | |
1260 if (abs (t1) < abs (t2)) | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1261 return 1; |
872 | 1262 else if (abs (t2) < abs (t1)) |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1263 return 0; |
872 | 1264 else if (t1 < t2) |
1265 /* Prefer a smaller font over a larger one just as far away | |
1266 because the smaller one won't upset the total line height if it's | |
1267 just a few chars. */ | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1268 return 1; |
872 | 1269 } |
1270 | |
2367 | 1271 t1 = !qxestrncasecmp_ascii (font1, "courier new:", 12); |
1272 t2 = !qxestrncasecmp_ascii (font2, "courier new:", 12); | |
872 | 1273 |
1274 if (t1 && !t2) | |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1275 return 1; |
872 | 1276 if (t2 && !t1) |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1277 return 0; |
872 | 1278 |
5350
94bbd4792049
Have #'sort*, #'merge use the same test approach as functions from cl-seq.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5256
diff
changeset
|
1279 return 0; |
872 | 1280 } |
1281 | |
428 | 1282 /* |
440 | 1283 * Enumerate the available on the HDC fonts and return a list of string |
1284 * font names. | |
428 | 1285 */ |
440 | 1286 Lisp_Object |
1287 mswindows_enumerate_fonts (HDC hdc) | |
428 | 1288 { |
771 | 1289 /* This cannot GC */ |
1290 LOGFONTW logfont; | |
428 | 1291 struct font_enum_t font_enum; |
1292 | |
771 | 1293 assert (hdc != NULL); |
428 | 1294 logfont.lfCharSet = DEFAULT_CHARSET; |
1295 logfont.lfFaceName[0] = '\0'; | |
1296 logfont.lfPitchAndFamily = DEFAULT_PITCH; | |
1297 font_enum.hdc = hdc; | |
440 | 1298 font_enum.list = Qnil; |
771 | 1299 /* EnumFontFamilies seems to enumerate only one charset per font, which |
1300 is not what we want. We aren't supporting NT 3.5x, so no need to | |
1301 worry about this not existing. */ | |
1302 qxeEnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROCW) font_enum_callback_1, | |
1303 (LPARAM) (&font_enum), 0); | |
442 | 1304 |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5176
diff
changeset
|
1305 return list_sort (font_enum.list, sort_font_list_function, Qnil, Qidentity); |
428 | 1306 } |
1307 | |
442 | 1308 static HFONT |
771 | 1309 mswindows_create_font_variant (Lisp_Font_Instance *f, |
440 | 1310 int under, int strike) |
1311 { | |
1312 /* Cannot GC */ | |
771 | 1313 LOGFONTW lf; |
440 | 1314 HFONT hfont; |
1315 | |
1316 assert (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) == NULL); | |
1317 | |
771 | 1318 if (qxeGetObject (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0), |
1319 sizeof (lf), (void *) &lf) == 0) | |
440 | 1320 { |
1321 hfont = MSWINDOWS_BAD_HFONT; | |
1322 } | |
1323 else | |
1324 { | |
1325 lf.lfUnderline = under; | |
1326 lf.lfStrikeOut = strike; | |
1327 | |
771 | 1328 hfont = qxeCreateFontIndirect (&lf); |
440 | 1329 if (hfont == NULL) |
1330 hfont = MSWINDOWS_BAD_HFONT; | |
1331 } | |
1332 | |
1333 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) = hfont; | |
442 | 1334 return hfont; |
440 | 1335 } |
1336 | |
1337 HFONT | |
771 | 1338 mswindows_get_hfont (Lisp_Font_Instance *f, |
440 | 1339 int under, int strike) |
1340 { | |
1341 /* Cannot GC */ | |
442 | 1342 HFONT hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike); |
440 | 1343 |
442 | 1344 if (hfont == NULL) |
1345 hfont = mswindows_create_font_variant (f, under, strike); | |
440 | 1346 |
1347 /* If strikeout/underline variant of the font could not be | |
1348 created, then use the base version of the font */ | |
1349 if (hfont == MSWINDOWS_BAD_HFONT) | |
1350 hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0); | |
1351 | |
1352 assert (hfont != NULL && hfont != MSWINDOWS_BAD_HFONT); | |
1353 | |
1354 return hfont; | |
1355 } | |
428 | 1356 |
1357 /************************************************************************/ | |
1358 /* methods */ | |
1359 /************************************************************************/ | |
1360 | |
1361 static int | |
440 | 1362 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name, |
2286 | 1363 Lisp_Object UNUSED (device), |
1364 Error_Behavior errb) | |
428 | 1365 { |
1366 COLORREF color; | |
1367 | |
771 | 1368 color = mswindows_string_to_color (XSTRING_DATA (name)); |
647 | 1369 if (color != (COLORREF) -1) |
428 | 1370 { |
1371 c->data = xnew (struct mswindows_color_instance_data); | |
1372 COLOR_INSTANCE_MSWINDOWS_COLOR (c) = color; | |
1373 return 1; | |
1374 } | |
563 | 1375 maybe_signal_error (Qinvalid_constant, |
771 | 1376 "Unrecognized color", name, Qcolor, errb); |
428 | 1377 return(0); |
1378 } | |
1379 | |
1380 #if 0 | |
1381 static void | |
440 | 1382 mswindows_mark_color_instance (Lisp_Color_Instance *c) |
428 | 1383 { |
1384 } | |
1385 #endif | |
1386 | |
1387 static void | |
440 | 1388 mswindows_print_color_instance (Lisp_Color_Instance *c, |
1389 Lisp_Object printcharfun, | |
2286 | 1390 int UNUSED (escapeflag)) |
428 | 1391 { |
1392 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c); | |
793 | 1393 write_fmt_string (printcharfun, |
1394 " %06ld=(%04X,%04X,%04X)", color & 0xffffff, | |
1395 GetRValue (color) * 257, GetGValue (color) * 257, | |
1396 GetBValue (color) * 257); | |
428 | 1397 } |
1398 | |
1399 static void | |
440 | 1400 mswindows_finalize_color_instance (Lisp_Color_Instance *c) |
428 | 1401 { |
1402 if (c->data) | |
1403 { | |
4976
16112448d484
Rename xfree(FOO, TYPE) -> xfree(FOO)
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
1404 xfree (c->data); |
428 | 1405 c->data = 0; |
1406 } | |
1407 } | |
1408 | |
1409 static int | |
440 | 1410 mswindows_color_instance_equal (Lisp_Color_Instance *c1, |
1411 Lisp_Color_Instance *c2, | |
2286 | 1412 int UNUSED (depth)) |
428 | 1413 { |
793 | 1414 return (COLOR_INSTANCE_MSWINDOWS_COLOR (c1) == |
1415 COLOR_INSTANCE_MSWINDOWS_COLOR (c2)); | |
428 | 1416 } |
1417 | |
2515 | 1418 static Hashcode |
5192
635f4b506855
Call internal_hash() with its new arg, Win32-specific code, fixing build
Aidan Kehoe <kehoea@parhasard.net>
parents:
5191
diff
changeset
|
1419 mswindows_color_instance_hash (Lisp_Color_Instance *c, int UNUSED (depth)) |
428 | 1420 { |
793 | 1421 return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR (c); |
428 | 1422 } |
1423 | |
1424 static Lisp_Object | |
440 | 1425 mswindows_color_instance_rgb_components (Lisp_Color_Instance *c) |
428 | 1426 { |
1427 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c); | |
5581
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5470
diff
changeset
|
1428 return list3 (make_fixnum (GetRValue (color) * 257), |
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5470
diff
changeset
|
1429 make_fixnum (GetGValue (color) * 257), |
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5470
diff
changeset
|
1430 make_fixnum (GetBValue (color) * 257)); |
428 | 1431 } |
1432 | |
1433 static int | |
2286 | 1434 mswindows_valid_color_name_p (struct device *UNUSED (d), Lisp_Object color) |
428 | 1435 { |
771 | 1436 return (mswindows_string_to_color (XSTRING_DATA (color)) != (COLORREF) -1); |
428 | 1437 } |
1438 | |
1439 | |
1440 | |
1441 static void | |
440 | 1442 mswindows_finalize_font_instance (Lisp_Font_Instance *f); |
428 | 1443 |
872 | 1444 /* Parse the font spec in NAMESTR. Maybe issue errors, according to ERRB; |
1445 NAME_FOR_ERRORS is the Lisp string to use when issuing errors. Store | |
1446 the five parts of the font spec into the given strings, which should be | |
1447 declared as | |
1448 | |
1449 Ibyte fontname[LF_FACESIZE], weight[LF_FACESIZE], points[8]; | |
1450 Ibyte effects[LF_FACESIZE], charset[LF_FACESIZE]; | |
1451 | |
1452 If LOGFONT is given, store the necessary information in LOGFONT to | |
1453 create a font object. If LOGFONT is given, HDC must also be given; | |
1454 else, NULL can be given for both. | |
1455 | |
1456 Return 1 if ok, 0 if error. | |
1457 */ | |
1458 static int | |
1459 parse_font_spec (const Ibyte *namestr, | |
1460 HDC hdc, | |
1461 Lisp_Object name_for_errors, | |
1462 Error_Behavior errb, | |
1463 LOGFONTW *logfont, | |
1464 Ibyte *fontname, | |
1465 Ibyte *weight, | |
1466 Ibyte *points, | |
1467 Ibyte *effects, | |
1468 Ibyte *charset) | |
428 | 1469 { |
1470 int fields, i; | |
1471 int pt; | |
872 | 1472 Ibyte *style; |
867 | 1473 Ibyte *c; |
428 | 1474 |
1475 /* | |
1476 * mswindows fonts look like: | |
1477 * fontname[:[weight ][style][:pointsize[:effects]]][:charset] | |
1478 * The font name field shouldn't be empty. | |
1479 * | |
1480 * ie: | |
1481 * Lucida Console:Regular:10 | |
1482 * minimal: | |
1483 * Courier New | |
1484 * maximal: | |
1485 * Courier New:Bold Italic:10:underline strikeout:western | |
1486 */ | |
1487 | |
872 | 1488 fontname[0] = 0; |
1489 weight[0] = 0; | |
1490 points[0] = 0; | |
1491 effects[0] = 0; | |
1492 charset[0] = 0; | |
1493 | |
1494 if (logfont) | |
1495 xzero (*logfont); | |
1496 | |
867 | 1497 fields = sscanf ((CIbyte *) namestr, "%31[^:]:%31[^:]:%7[^:]:%31[^:]:%31s", |
428 | 1498 fontname, weight, points, effects, charset); |
1499 | |
1500 /* This function is implemented in a fairly ad-hoc manner. | |
1501 * The general idea is to validate and canonicalize each of the above fields | |
1502 * at the same time as we build up the win32 LOGFONT structure. This enables | |
1503 * us to use match_font() on a canonicalized font string to check the | |
1504 * availability of the requested font */ | |
1505 | |
1506 if (fields < 0) | |
771 | 1507 { |
788 | 1508 maybe_signal_error (Qinvalid_argument, "Invalid font", name_for_errors, |
771 | 1509 Qfont, errb); |
872 | 1510 return 0; |
771 | 1511 } |
1512 | |
1513 if (fields > 0 && qxestrlen (fontname)) | |
1514 { | |
1515 Extbyte *extfontname; | |
428 | 1516 |
4981
4aebb0131297
Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
1517 extfontname = ITEXT_TO_TSTR (fontname); |
872 | 1518 if (logfont) |
1519 { | |
2421 | 1520 qxetcsncpy ((Extbyte *) logfont->lfFaceName, extfontname, |
872 | 1521 LF_FACESIZE - 1); |
1522 logfont->lfFaceName[LF_FACESIZE - 1] = 0; | |
1523 } | |
771 | 1524 } |
428 | 1525 |
1526 /* weight */ | |
1527 if (fields < 2) | |
2367 | 1528 qxestrcpy_ascii (weight, fontweight_map[0].name); |
428 | 1529 |
1530 /* Maybe split weight into weight and style */ | |
771 | 1531 if ((c = qxestrchr (weight, ' '))) |
872 | 1532 { |
1533 *c = '\0'; | |
1534 style = c + 1; | |
1535 } | |
428 | 1536 else |
1537 style = NULL; | |
1538 | |
771 | 1539 for (i = 0; i < countof (fontweight_map); i++) |
2367 | 1540 if (!qxestrcasecmp_ascii (weight, fontweight_map[i].name)) |
442 | 1541 { |
872 | 1542 if (logfont) |
1543 logfont->lfWeight = fontweight_map[i].value; | |
428 | 1544 break; |
1545 } | |
1546 if (i == countof (fontweight_map)) /* No matching weight */ | |
1547 { | |
1548 if (!style) | |
1549 { | |
872 | 1550 if (logfont) |
1551 logfont->lfWeight = FW_REGULAR; | |
428 | 1552 style = weight; /* May have specified style without weight */ |
1553 } | |
1554 else | |
1555 { | |
788 | 1556 maybe_signal_error (Qinvalid_constant, "Invalid font weight", |
1557 name_for_errors, Qfont, errb); | |
872 | 1558 return 0; |
428 | 1559 } |
1560 } | |
1561 | |
1562 if (style) | |
1563 { | |
1564 /* #### what about oblique? */ | |
2367 | 1565 if (qxestrcasecmp_ascii (style, "italic") == 0) |
872 | 1566 { |
1567 if (logfont) | |
1568 logfont->lfItalic = TRUE; | |
1569 } | |
428 | 1570 else |
788 | 1571 { |
1572 maybe_signal_error (Qinvalid_constant, | |
1573 "Invalid font weight or style", | |
1574 name_for_errors, Qfont, errb); | |
872 | 1575 return 0; |
428 | 1576 } |
1577 | |
1578 /* Glue weight and style together again */ | |
1579 if (weight != style) | |
1580 *c = ' '; | |
1581 } | |
872 | 1582 else if (logfont) |
1583 logfont->lfItalic = FALSE; | |
428 | 1584 |
2367 | 1585 if (fields < 3 || !qxestrcmp_ascii (points, "")) |
872 | 1586 ; |
1587 else if (points[0] == '0' || | |
1588 qxestrspn (points, "0123456789") < qxestrlen (points)) | |
428 | 1589 { |
788 | 1590 maybe_signal_error (Qinvalid_argument, "Invalid font pointsize", |
1591 name_for_errors, Qfont, errb); | |
872 | 1592 return 0; |
1593 } | |
1594 else | |
1595 { | |
1596 pt = qxeatoi (points); | |
1597 | |
1598 if (logfont) | |
1599 { | |
1600 /* Formula for pointsize->height from LOGFONT docs in MSVC5 Platform | |
1601 SDK */ | |
1602 logfont->lfHeight = -MulDiv (pt, GetDeviceCaps (hdc, LOGPIXELSY), | |
1603 72); | |
1604 logfont->lfWidth = 0; | |
1605 } | |
428 | 1606 } |
1607 | |
872 | 1608 /* Effects */ |
1609 if (logfont) | |
1610 { | |
1611 logfont->lfUnderline = FALSE; | |
1612 logfont->lfStrikeOut = FALSE; | |
1613 } | |
428 | 1614 |
1615 if (fields >= 4 && effects[0] != '\0') | |
1616 { | |
867 | 1617 Ibyte *effects2; |
872 | 1618 int underline = FALSE, strikeout = FALSE; |
428 | 1619 |
1620 /* Maybe split effects into effects and effects2 */ | |
771 | 1621 if ((c = qxestrchr (effects, ' '))) |
428 | 1622 { |
1623 *c = '\0'; | |
771 | 1624 effects2 = c + 1; |
428 | 1625 } |
1626 else | |
1627 effects2 = NULL; | |
1628 | |
2367 | 1629 if (qxestrcasecmp_ascii (effects, "underline") == 0) |
872 | 1630 underline = TRUE; |
2367 | 1631 else if (qxestrcasecmp_ascii (effects, "strikeout") == 0) |
872 | 1632 strikeout = TRUE; |
428 | 1633 else |
1634 { | |
788 | 1635 maybe_signal_error (Qinvalid_constant, "Invalid font effect", |
1636 name_for_errors, Qfont, errb); | |
872 | 1637 return 0; |
428 | 1638 } |
1639 | |
1640 if (effects2 && effects2[0] != '\0') | |
1641 { | |
2367 | 1642 if (qxestrcasecmp_ascii (effects2, "underline") == 0) |
872 | 1643 underline = TRUE; |
2367 | 1644 else if (qxestrcasecmp_ascii (effects2, "strikeout") == 0) |
872 | 1645 strikeout = TRUE; |
428 | 1646 else |
1647 { | |
771 | 1648 maybe_signal_error (Qinvalid_constant, "Invalid font effect", |
788 | 1649 name_for_errors, Qfont, errb); |
872 | 1650 return 0; |
428 | 1651 } |
1652 } | |
1653 | |
872 | 1654 /* Regenerate sanitized effects string */ |
1655 if (underline) | |
428 | 1656 { |
872 | 1657 if (strikeout) |
2367 | 1658 qxestrcpy_ascii (effects, "underline strikeout"); |
428 | 1659 else |
2367 | 1660 qxestrcpy_ascii (effects, "underline"); |
428 | 1661 } |
872 | 1662 else if (strikeout) |
2367 | 1663 qxestrcpy_ascii (effects, "strikeout"); |
872 | 1664 |
1665 if (logfont) | |
1666 { | |
1667 logfont->lfUnderline = underline; | |
1668 logfont->lfStrikeOut = strikeout; | |
1669 } | |
428 | 1670 } |
1671 | |
1672 /* Charset */ | |
442 | 1673 /* charset can be specified even if earlier fields haven't been */ |
428 | 1674 if (fields < 5) |
1675 { | |
771 | 1676 if ((c = qxestrchr (namestr, ':')) && (c = qxestrchr (c + 1, ':')) && |
1677 (c = qxestrchr (c + 1, ':')) && (c = qxestrchr (c + 1, ':'))) | |
428 | 1678 { |
771 | 1679 qxestrncpy (charset, c + 1, LF_FACESIZE); |
1680 charset[LF_FACESIZE - 1] = '\0'; | |
428 | 1681 } |
1682 } | |
1683 | |
872 | 1684 /* NOTE: If you give a blank charset spec, we will normally not get here |
1685 under Mule unless we explicitly call `make-font-instance'! This is | |
1686 because the C code instantiates fonts using particular charsets, by | |
1687 way of specifier_matching_instance(). Before instantiating the font, | |
1688 font_instantiate() calls the devmeth find_matching_font(), which gets | |
1689 a truename font spec with the registry (i.e. the charset spec) filled | |
1690 in appropriately to the charset. */ | |
2367 | 1691 if (!qxestrcmp_ascii (charset, "")) |
872 | 1692 ; |
1693 else | |
1694 { | |
1695 for (i = 0; i < countof (charset_map); i++) | |
2367 | 1696 if (!qxestrcasecmp_ascii (charset, charset_map[i].name)) |
872 | 1697 { |
1698 if (logfont) | |
1699 logfont->lfCharSet = charset_map[i].value; | |
1700 break; | |
1701 } | |
428 | 1702 |
872 | 1703 if (i == countof (charset_map)) /* No matching charset */ |
1704 { | |
1705 maybe_signal_error (Qinvalid_argument, "Invalid charset", | |
1706 name_for_errors, Qfont, errb); | |
1707 return 0; | |
1708 } | |
1709 } | |
1710 | |
1711 if (logfont) | |
428 | 1712 { |
872 | 1713 /* Misc crud */ |
1714 #if 1 | |
1715 logfont->lfOutPrecision = OUT_DEFAULT_PRECIS; | |
1716 logfont->lfClipPrecision = CLIP_DEFAULT_PRECIS; | |
1717 logfont->lfQuality = DEFAULT_QUALITY; | |
1718 #else | |
1719 logfont->lfOutPrecision = OUT_STROKE_PRECIS; | |
1720 logfont->lfClipPrecision = CLIP_STROKE_PRECIS; | |
1721 logfont->lfQuality = PROOF_QUALITY; | |
1722 #endif | |
1723 /* Default to monospaced if the specified fontname doesn't exist. */ | |
1724 logfont->lfPitchAndFamily = FF_MODERN; | |
428 | 1725 } |
1726 | |
872 | 1727 return 1; |
1728 } | |
1729 | |
1730 /* | |
1731 mswindows fonts look like: | |
1732 [fontname[:style[:pointsize[:effects]]]][:charset] | |
1733 A maximal mswindows font spec looks like: | |
1734 Courier New:Bold Italic:10:underline strikeout:Western | |
1735 | |
1736 A missing weight/style field is the same as Regular, and a missing | |
1737 effects field is left alone, and means no effects; but a missing | |
1738 fontname, pointsize or charset field means any will do. We prefer | |
1739 Courier New, 10, Western. See sort function above. */ | |
428 | 1740 |
872 | 1741 static HFONT |
1742 create_hfont_from_font_spec (const Ibyte *namestr, | |
1743 HDC hdc, | |
1744 Lisp_Object name_for_errors, | |
1745 Lisp_Object device_font_list, | |
1746 Error_Behavior errb, | |
1747 Lisp_Object *truename_ret) | |
1748 { | |
1749 LOGFONTW logfont; | |
1750 HFONT hfont; | |
1751 Ibyte fontname[LF_FACESIZE], weight[LF_FACESIZE], points[8]; | |
1752 Ibyte effects[LF_FACESIZE], charset[LF_FACESIZE]; | |
1753 Ibyte truename[MSW_FONTSIZE]; | |
1754 Ibyte truername[MSW_FONTSIZE]; | |
1755 | |
1756 /* Windows will silently substitute a default font if the fontname | |
1757 specifies a non-existent font. This is bad for screen fonts because | |
1758 it doesn't allow higher-level code to see the error and to act | |
1759 appropriately. For instance complex_vars_of_faces() sets up a | |
1760 fallback list of fonts for the default face. Instead, we look at all | |
1761 the possibilities and pick one that works, handling missing pointsize | |
1762 and charset fields appropriately. | |
1763 | |
1764 For printer fonts, we used to go ahead and let Windows choose the | |
1765 font, and for those devices, then, DEVICE_FONT_LIST would be nil. | |
1766 However, this causes problems with the font-matching code below, which | |
1767 needs a list of fonts so it can pick the right one for Mule. | |
1768 | |
1769 Thus, the code below to handle a nil DEVICE_FONT_LIST is not currently | |
1770 used. */ | |
440 | 1771 |
1772 if (!NILP (device_font_list)) | |
1773 { | |
872 | 1774 Lisp_Object fonttail = Qnil; |
1775 | |
1776 if (!parse_font_spec (namestr, 0, name_for_errors, | |
1777 errb, 0, fontname, weight, points, | |
1778 effects, charset)) | |
1779 return 0; | |
1780 | |
1781 /* The fonts in the device font list always specify fontname and | |
1782 charset, but often times not the size; so if we don't have the | |
1783 size specified either, do a round with size 10 so we'll always end | |
1784 up with a size in the truename (if we fail this one but succeed | |
1785 the next one, we'll have chosen a non-TrueType font, and in those | |
1786 cases the size is specified in the font list item. */ | |
1787 | |
1788 if (!points[0]) | |
1789 { | |
1790 qxesprintf (truename, "%s:%s:10:%s:%s", | |
1791 fontname, weight, effects, charset); | |
428 | 1792 |
872 | 1793 LIST_LOOP (fonttail, device_font_list) |
1794 { | |
1795 if (match_font (XSTRING_DATA (XCAR (XCAR (fonttail))), | |
1796 truename, truername)) | |
1797 break; | |
1798 } | |
1799 } | |
1800 | |
1801 if (NILP (fonttail)) | |
440 | 1802 { |
872 | 1803 qxesprintf (truename, "%s:%s:%s:%s:%s", |
1804 fontname, weight, points, effects, charset); | |
1805 | |
1806 LIST_LOOP (fonttail, device_font_list) | |
1807 { | |
1808 if (match_font (XSTRING_DATA (XCAR (XCAR (fonttail))), | |
1809 truename, truername)) | |
1810 break; | |
1811 } | |
440 | 1812 } |
872 | 1813 |
440 | 1814 if (NILP (fonttail)) |
1815 { | |
788 | 1816 maybe_signal_error (Qinvalid_argument, "No matching font", |
1817 name_for_errors, Qfont, errb); | |
872 | 1818 return 0; |
440 | 1819 } |
872 | 1820 |
1821 if (!parse_font_spec (truername, hdc, name_for_errors, | |
1822 ERROR_ME_DEBUG_WARN, &logfont, fontname, weight, | |
1823 points, effects, charset)) | |
1824 signal_error (Qinternal_error, "Bad value in device font list?", | |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4952
diff
changeset
|
1825 build_istring (truername)); |
440 | 1826 } |
872 | 1827 else if (!parse_font_spec (namestr, hdc, name_for_errors, |
1828 errb, &logfont, fontname, weight, points, | |
1829 effects, charset)) | |
1830 return 0; | |
440 | 1831 |
771 | 1832 if ((hfont = qxeCreateFontIndirect (&logfont)) == NULL) |
788 | 1833 { |
1834 maybe_signal_error (Qgui_error, "Couldn't create font", | |
1835 name_for_errors, Qfont, errb); | |
872 | 1836 return 0; |
788 | 1837 } |
1838 | |
872 | 1839 /* #### Truename will not have all its fields filled in when we have no |
1840 list of fonts. Doesn't really matter now, since we always have one. | |
1841 See above. */ | |
1842 qxesprintf (truename, "%s:%s:%s:%s:%s", fontname, weight, | |
1843 points, effects, charset); | |
1844 | |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4952
diff
changeset
|
1845 *truename_ret = build_istring (truename); |
788 | 1846 return hfont; |
1847 } | |
1848 | |
1849 /* | |
1850 * This is a work horse for both mswindows_initialize_font_instance and | |
1851 * msprinter_initialize_font_instance. | |
1852 */ | |
1853 static int | |
1854 initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, | |
1855 Lisp_Object device_font_list, HDC hdc, | |
1856 Error_Behavior errb) | |
1857 { | |
1858 HFONT hfont, hfont2; | |
1859 TEXTMETRICW metrics; | |
867 | 1860 Ibyte *namestr = XSTRING_DATA (name); |
872 | 1861 Lisp_Object truename; |
788 | 1862 |
1863 hfont = create_hfont_from_font_spec (namestr, hdc, name, device_font_list, | |
872 | 1864 errb, &truename); |
4932 | 1865 if (!hfont) |
1866 return 0; | |
872 | 1867 f->truename = truename; |
440 | 1868 f->data = xnew_and_zero (struct mswindows_font_instance_data); |
872 | 1869 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0) = hfont; |
442 | 1870 |
1871 /* Some underlined fonts have the descent of one pixel more than their | |
1872 non-underlined counterparts. Font variants though are assumed to have | |
1873 identical metrics. So get the font metrics from the underlined variant | |
1874 of the font */ | |
1875 hfont2 = mswindows_create_font_variant (f, 1, 0); | |
1876 if (hfont2 != MSWINDOWS_BAD_HFONT) | |
1877 hfont = hfont2; | |
1878 | |
1879 hfont2 = (HFONT) SelectObject (hdc, hfont); | |
1880 if (!hfont2) | |
428 | 1881 { |
440 | 1882 mswindows_finalize_font_instance (f); |
563 | 1883 maybe_signal_error (Qgui_error, "Couldn't map font", name, Qfont, errb); |
440 | 1884 return 0; |
1885 } | |
771 | 1886 qxeGetTextMetrics (hdc, &metrics); |
1887 SelectObject (hdc, hfont2); | |
440 | 1888 |
1889 f->width = (unsigned short) metrics.tmAveCharWidth; | |
1890 f->height = (unsigned short) metrics.tmHeight; | |
442 | 1891 f->ascent = (unsigned short) metrics.tmAscent; |
1892 f->descent = (unsigned short) metrics.tmDescent; | |
440 | 1893 f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH); |
1894 | |
1895 return 1; | |
1896 } | |
1897 | |
1898 static int | |
1899 mswindows_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, | |
578 | 1900 Lisp_Object device, Error_Behavior errb) |
440 | 1901 { |
1902 HDC hdc = CreateCompatibleDC (NULL); | |
1903 Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device)); | |
1904 int res = initialize_font_instance (f, name, font_list, hdc, errb); | |
1905 DeleteDC (hdc); | |
1906 return res; | |
1907 } | |
1908 | |
1909 static int | |
1910 msprinter_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, | |
578 | 1911 Lisp_Object device, Error_Behavior errb) |
440 | 1912 { |
1913 HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (device)); | |
1914 Lisp_Object font_list = DEVICE_MSPRINTER_FONTLIST (XDEVICE (device)); | |
1915 return initialize_font_instance (f, name, font_list, hdc, errb); | |
1916 } | |
1917 | |
1918 static void | |
1919 mswindows_finalize_font_instance (Lisp_Font_Instance *f) | |
1920 { | |
1921 int i; | |
1922 | |
1923 if (f->data) | |
1924 { | |
1925 for (i = 0; i < MSWINDOWS_NUM_FONT_VARIANTS; i++) | |
428 | 1926 { |
440 | 1927 if (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != NULL |
1928 && FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != MSWINDOWS_BAD_HFONT) | |
1929 DeleteObject (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i)); | |
428 | 1930 } |
440 | 1931 |
4976
16112448d484
Rename xfree(FOO, TYPE) -> xfree(FOO)
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
1932 xfree (f->data); |
440 | 1933 f->data = 0; |
1934 } | |
428 | 1935 } |
1936 | |
1937 #if 0 | |
1938 static void | |
440 | 1939 mswindows_mark_font_instance (Lisp_Font_Instance *f) |
428 | 1940 { |
1941 } | |
1942 #endif | |
1943 | |
1944 static void | |
440 | 1945 mswindows_print_font_instance (Lisp_Font_Instance *f, |
1946 Lisp_Object printcharfun, | |
2286 | 1947 int UNUSED (escapeflag)) |
428 | 1948 { |
793 | 1949 write_fmt_string (printcharfun, " 0x%lx", |
1950 (unsigned long) | |
1951 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0)); | |
1952 | |
428 | 1953 } |
1954 | |
1955 static Lisp_Object | |
2527 | 1956 mswindows_font_list (Lisp_Object pattern, Lisp_Object device, |
2286 | 1957 Lisp_Object UNUSED (maxnumber)) |
428 | 1958 { |
771 | 1959 struct device *d = XDEVICE (device); |
1960 Lisp_Object font_list = Qnil, fonttail, result = Qnil; | |
428 | 1961 |
771 | 1962 if (DEVICE_MSWINDOWS_P (d)) |
1963 font_list = DEVICE_MSWINDOWS_FONTLIST (d); | |
1964 else if (DEVICE_MSPRINTER_P (d)) | |
1965 font_list = DEVICE_MSPRINTER_FONTLIST (d); | |
1966 else | |
2500 | 1967 ABORT (); |
440 | 1968 |
771 | 1969 LIST_LOOP (fonttail, font_list) |
428 | 1970 { |
867 | 1971 Ibyte fontname[MSW_FONTSIZE]; |
771 | 1972 |
872 | 1973 if (match_font (XSTRING_DATA (XCAR (XCAR (fonttail))), |
1974 XSTRING_DATA (pattern), | |
771 | 1975 fontname)) |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4952
diff
changeset
|
1976 result = Fcons (build_istring (fontname), result); |
428 | 1977 } |
1978 | |
1979 return Fnreverse (result); | |
1980 } | |
1981 | |
1982 static Lisp_Object | |
2286 | 1983 mswindows_font_instance_truename (Lisp_Font_Instance *f, |
1984 Error_Behavior UNUSED (errb)) | |
428 | 1985 { |
872 | 1986 return f->truename; |
428 | 1987 } |
1988 | |
1989 #ifdef MULE | |
1990 | |
1991 static int | |
2286 | 1992 mswindows_font_spec_matches_charset_stage_1 (struct device *UNUSED (d), |
872 | 1993 Lisp_Object charset, |
1994 const Ibyte *nonreloc, | |
1995 Lisp_Object reloc, | |
1996 Bytecount offset, | |
1997 Bytecount length) | |
428 | 1998 { |
872 | 1999 int i; |
2000 Lisp_Object charset_registry; | |
2001 const Ibyte *font_charset; | |
867 | 2002 const Ibyte *the_nonreloc = nonreloc; |
2003 const Ibyte *c; | |
788 | 2004 Bytecount the_length = length; |
2005 | |
4353
4143b78d0df0
Merge an old patch of Ben's, involving font instantiation and charsets.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3662
diff
changeset
|
2006 if (NILP (charset)) |
788 | 2007 return 1; |
2008 | |
2009 if (!the_nonreloc) | |
2010 the_nonreloc = XSTRING_DATA (reloc); | |
2011 fixup_internal_substring (nonreloc, reloc, offset, &the_length); | |
2012 the_nonreloc += offset; | |
2013 | |
2014 c = the_nonreloc; | |
2015 for (i = 0; i < 4; i++) | |
2016 { | |
867 | 2017 Ibyte *newc = (Ibyte *) memchr (c, ':', the_length); |
788 | 2018 if (!newc) |
2019 break; | |
2020 newc++; | |
2021 the_length -= (newc - c); | |
2022 c = newc; | |
2023 } | |
2024 | |
872 | 2025 if (i < 4) |
2026 return 0; | |
2027 | |
2028 font_charset = c; | |
2029 | |
2030 /* For border-glyph use */ | |
2367 | 2031 if (!qxestrcasecmp_ascii (font_charset, "symbol")) |
872 | 2032 font_charset = (const Ibyte *) "western"; |
2033 | |
2034 /* Get code page for the charset */ | |
2035 charset_registry = Fmswindows_charset_registry (charset); | |
2036 if (!STRINGP (charset_registry)) | |
2037 return 0; | |
2038 | |
2039 return !qxestrcasecmp (XSTRING_DATA (charset_registry), font_charset); | |
2040 } | |
2041 | |
2042 /* | |
2043 | |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
2044 #### The following comment is old and probably not applicable any longer. |
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
2045 |
872 | 2046 1. handle standard mapping and inheritance vectors properly in Face-frob-property. |
2047 2. finish impl of mswindows-charset-registry. | |
2048 3. see if everything works under fixup, now that i copied the stuff over. | |
2049 4. consider generalizing Face-frob-property to frob-specifier. | |
2050 5. maybe extract some of the flets out of Face-frob-property as useful specifier frobbing. | |
2051 6. eventually this stuff's got to be checked in!!!! | |
2052 */ | |
2053 | |
2054 static int | |
2055 mswindows_font_spec_matches_charset_stage_2 (struct device *d, | |
2056 Lisp_Object charset, | |
2057 const Ibyte *nonreloc, | |
2058 Lisp_Object reloc, | |
2059 Bytecount offset, | |
2060 Bytecount length) | |
2061 { | |
2062 const Ibyte *the_nonreloc = nonreloc; | |
2063 FONTSIGNATURE fs; | |
2064 FONTSIGNATURE *fsp = &fs; | |
2065 struct gcpro gcpro1; | |
2066 Lisp_Object fontsig; | |
2067 Bytecount the_length = length; | |
2068 int i; | |
2069 | |
4353
4143b78d0df0
Merge an old patch of Ben's, involving font instantiation and charsets.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3662
diff
changeset
|
2070 if (NILP (charset)) |
788 | 2071 return 1; |
2072 | |
872 | 2073 if (!the_nonreloc) |
2074 the_nonreloc = XSTRING_DATA (reloc); | |
2075 fixup_internal_substring (nonreloc, reloc, offset, &the_length); | |
2076 the_nonreloc += offset; | |
2077 | |
2078 /* Get the list of Unicode subranges corresponding to the font. This | |
2079 is contained inside of FONTSIGNATURE data, obtained by calling | |
2080 GetTextCharsetInfo on a font object, which we need to create from the | |
2081 spec. See if the FONTSIGNATURE data is already cached. If not, get | |
2082 it and cache it. */ | |
2083 if (!STRINGP (reloc) || the_nonreloc != XSTRING_DATA (reloc)) | |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4952
diff
changeset
|
2084 reloc = build_istring (the_nonreloc); |
872 | 2085 GCPRO1 (reloc); |
2086 fontsig = Fgethash (reloc, Vfont_signature_data, Qunbound); | |
2087 | |
2088 if (!UNBOUNDP (fontsig)) | |
2089 { | |
2090 fsp = (FONTSIGNATURE *) XOPAQUE_DATA (fontsig); | |
2091 UNGCPRO; | |
2092 } | |
2093 else | |
2094 { | |
2095 HDC hdc = CreateCompatibleDC (NULL); | |
4579
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2096 Lisp_Object font_list = Qnil, truename; |
5016
2ade80e8c640
enable more warnings and fix them
Ben Wing <ben@xemacs.org>
parents:
5015
diff
changeset
|
2097 HFONT hfont; |
4579
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2098 |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2099 if (DEVICE_TYPE_P (d, mswindows)) |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2100 { |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2101 font_list = DEVICE_MSWINDOWS_FONTLIST (d); |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2102 } |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2103 else if (DEVICE_TYPE_P (d, msprinter)) |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2104 { |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2105 font_list = DEVICE_MSPRINTER_FONTLIST (d); |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2106 } |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2107 else |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2108 { |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2109 assert(0); |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2110 } |
68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
Aidan Kehoe <kehoea@parhasard.net>
parents:
4353
diff
changeset
|
2111 |
5016
2ade80e8c640
enable more warnings and fix them
Ben Wing <ben@xemacs.org>
parents:
5015
diff
changeset
|
2112 hfont = create_hfont_from_font_spec (the_nonreloc, hdc, Qnil, |
2ade80e8c640
enable more warnings and fix them
Ben Wing <ben@xemacs.org>
parents:
5015
diff
changeset
|
2113 font_list, |
2ade80e8c640
enable more warnings and fix them
Ben Wing <ben@xemacs.org>
parents:
5015
diff
changeset
|
2114 ERROR_ME_DEBUG_WARN, |
2ade80e8c640
enable more warnings and fix them
Ben Wing <ben@xemacs.org>
parents:
5015
diff
changeset
|
2115 &truename); |
788 | 2116 |
872 | 2117 if (!hfont || !(hfont = (HFONT) SelectObject (hdc, hfont))) |
2118 { | |
2119 nope: | |
2120 DeleteDC (hdc); | |
2121 UNGCPRO; | |
2122 return 0; | |
2123 } | |
5024 | 2124 |
872 | 2125 if (GetTextCharsetInfo (hdc, &fs, 0) == DEFAULT_CHARSET) |
2126 { | |
2127 SelectObject (hdc, hfont); | |
2128 goto nope; | |
2129 } | |
2130 SelectObject (hdc, hfont); | |
2131 DeleteDC (hdc); | |
2132 Fputhash (reloc, make_opaque (&fs, sizeof (fs)), Vfont_signature_data); | |
2133 UNGCPRO; | |
2134 } | |
788 | 2135 |
872 | 2136 { |
2137 int lowlim, highlim; | |
2138 int dim, j, cp = -1; | |
2139 | |
2140 /* Try to find a Unicode char in the charset. #### This is somewhat | |
2141 bogus. See below. | |
2142 | |
2143 #### Cache me baby!!!!!!!!!!!!! | |
2144 */ | |
2145 get_charset_limits (charset, &lowlim, &highlim); | |
2146 dim = XCHARSET_DIMENSION (charset); | |
2147 | |
2148 if (dim == 1) | |
788 | 2149 { |
872 | 2150 for (i = lowlim; i <= highlim; i++) |
2151 if ((cp = ichar_to_unicode (make_ichar (charset, i, 0))) >= 0) | |
2152 break; | |
788 | 2153 } |
2154 else | |
2155 { | |
872 | 2156 for (i = lowlim; i <= highlim; i++) |
2157 for (j = lowlim; j <= highlim; j++) | |
2158 if ((cp = ichar_to_unicode (make_ichar (charset, i, j))) >= 0) | |
2159 break; | |
2160 } | |
2161 | |
2162 if (cp < 0) | |
2163 return 0; | |
788 | 2164 |
872 | 2165 /* Check to see, for each subrange supported by the font, |
2166 whether the Unicode char is within that subrange. If any match, | |
2167 the font supports the char (whereby, the charset, bogusly). */ | |
2168 | |
2169 for (i = 0; i < 128; i++) | |
2170 { | |
2171 if (fsp->fsUsb[i >> 5] & (1 << (i & 32))) | |
788 | 2172 { |
872 | 2173 for (j = 0; j < unicode_subrange_table[i].no_subranges; j++) |
2174 if (cp >= unicode_subrange_table[i].subranges[j].start && | |
2175 cp <= unicode_subrange_table[i].subranges[j].end) | |
2176 return 1; | |
788 | 2177 } |
2178 } | |
2179 | |
872 | 2180 return 0; |
788 | 2181 } |
2182 } | |
2183 | |
872 | 2184 /* |
2185 Given a truename font spec, does it match CHARSET? | |
2186 | |
2187 We try two stages: | |
2188 | |
2189 -- First see if the charset corresponds to one of the predefined Windows | |
2190 charsets; if so, we see if the registry (that's the last element of the | |
2191 font spec) is that same charset. If so, this means that the font is | |
2192 specifically designed for the charset, and we prefer it. | |
2193 | |
2194 -- However, there are only a limited number of defined Windows charsets, | |
2195 and new ones aren't being defined; so if we fail the first stage, we find | |
2196 a character from the charset with a Unicode equivalent, and see if the | |
2197 font can display this character. we do that by retrieving the Unicode | |
2198 ranges that the font supports, to see if the character comes from that | |
2199 subrange. | |
2200 | |
2201 #### Note: We really want to be doing all these checks at the character | |
2202 level, not the charset level. There's no guarantee that a charset covers | |
2203 a single Unicode range. Furthermore, this is extremely wasteful. We | |
2204 should be doing this when we're about to redisplay and already have the | |
2205 Unicode codepoints in hand. | |
2206 */ | |
2207 | |
2208 static int | |
2209 mswindows_font_spec_matches_charset (struct device *d, Lisp_Object charset, | |
2210 const Ibyte *nonreloc, | |
2211 Lisp_Object reloc, | |
2212 Bytecount offset, Bytecount length, | |
3662 | 2213 enum font_specifier_matchspec_stages stage) |
872 | 2214 { |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
2215 return stage == STAGE_FINAL ? |
872 | 2216 mswindows_font_spec_matches_charset_stage_2 (d, charset, nonreloc, |
2217 reloc, offset, length) | |
2218 : mswindows_font_spec_matches_charset_stage_1 (d, charset, nonreloc, | |
2219 reloc, offset, length); | |
2220 } | |
2221 | |
2222 | |
2223 /* Find a font spec that matches font spec FONT and also matches | |
428 | 2224 (the registry of) CHARSET. */ |
872 | 2225 |
428 | 2226 static Lisp_Object |
2227 mswindows_find_charset_font (Lisp_Object device, Lisp_Object font, | |
3659 | 2228 Lisp_Object charset, |
2229 enum font_specifier_matchspec_stages stage) | |
428 | 2230 { |
771 | 2231 Lisp_Object fontlist, fonttail; |
2232 | |
872 | 2233 /* If FONT specifies a particular charset, this will only list fonts with |
2234 that charset; otherwise, it will list fonts with all charsets. */ | |
2527 | 2235 fontlist = mswindows_font_list (font, device, Qnil); |
872 | 2236 |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4982
diff
changeset
|
2237 if (stage == STAGE_INITIAL) |
771 | 2238 { |
872 | 2239 LIST_LOOP (fonttail, fontlist) |
2240 { | |
2241 if (mswindows_font_spec_matches_charset_stage_1 | |
2242 (XDEVICE (device), charset, 0, XCAR (fonttail), 0, -1)) | |
2243 return XCAR (fonttail); | |
2244 } | |
771 | 2245 } |
872 | 2246 else |
2247 { | |
2248 LIST_LOOP (fonttail, fontlist) | |
2249 { | |
2250 if (mswindows_font_spec_matches_charset_stage_2 | |
2251 (XDEVICE (device), charset, 0, XCAR (fonttail), 0, -1)) | |
2252 return XCAR (fonttail); | |
2253 } | |
2254 } | |
2255 | |
771 | 2256 return Qnil; |
428 | 2257 } |
2258 | |
2259 #endif /* MULE */ | |
2260 | |
2261 | |
2262 /************************************************************************/ | |
2263 /* non-methods */ | |
2264 /************************************************************************/ | |
2265 | |
2527 | 2266 static Lisp_Object |
2267 mswindows_color_list (void) | |
428 | 2268 { |
2269 Lisp_Object result = Qnil; | |
2270 int i; | |
2271 | |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
2272 for (i = countof (mswindows_X_color_map); i != 0;) |
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
2273 result = Fcons (build_ascstring (mswindows_X_color_map[--i].name), result); |
428 | 2274 |
5218
ec2ddc82f10d
Use binary search, not linear, for looking up color names, mswindows.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5192
diff
changeset
|
2275 return result; |
428 | 2276 } |
2277 | |
2278 | |
2279 /************************************************************************/ | |
2280 /* initialization */ | |
2281 /************************************************************************/ | |
2282 | |
2283 void | |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
5024
diff
changeset
|
2284 syms_of_fontcolor_mswindows (void) |
428 | 2285 { |
2286 } | |
2287 | |
2288 void | |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
5024
diff
changeset
|
2289 console_type_create_fontcolor_mswindows (void) |
428 | 2290 { |
2291 /* object methods */ | |
2292 CONSOLE_HAS_METHOD (mswindows, initialize_color_instance); | |
2293 /* CONSOLE_HAS_METHOD (mswindows, mark_color_instance); */ | |
2294 CONSOLE_HAS_METHOD (mswindows, print_color_instance); | |
2295 CONSOLE_HAS_METHOD (mswindows, finalize_color_instance); | |
2296 CONSOLE_HAS_METHOD (mswindows, color_instance_equal); | |
2297 CONSOLE_HAS_METHOD (mswindows, color_instance_hash); | |
2298 CONSOLE_HAS_METHOD (mswindows, color_instance_rgb_components); | |
2299 CONSOLE_HAS_METHOD (mswindows, valid_color_name_p); | |
2527 | 2300 CONSOLE_HAS_METHOD (mswindows, color_list); |
428 | 2301 |
2302 CONSOLE_HAS_METHOD (mswindows, initialize_font_instance); | |
2303 /* CONSOLE_HAS_METHOD (mswindows, mark_font_instance); */ | |
2304 CONSOLE_HAS_METHOD (mswindows, print_font_instance); | |
2305 CONSOLE_HAS_METHOD (mswindows, finalize_font_instance); | |
442 | 2306 CONSOLE_HAS_METHOD (mswindows, font_instance_truename); |
2527 | 2307 CONSOLE_HAS_METHOD (mswindows, font_list); |
428 | 2308 #ifdef MULE |
2309 CONSOLE_HAS_METHOD (mswindows, font_spec_matches_charset); | |
2310 CONSOLE_HAS_METHOD (mswindows, find_charset_font); | |
2311 #endif | |
440 | 2312 |
2313 /* Printer methods - delegate most to windows methods, | |
2314 since graphical objects behave the same way. */ | |
2315 | |
2316 CONSOLE_INHERITS_METHOD (msprinter, mswindows, initialize_color_instance); | |
2317 /* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_color_instance); */ | |
2318 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_color_instance); | |
2319 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_color_instance); | |
2320 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_equal); | |
2321 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_hash); | |
2322 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_rgb_components); | |
2323 CONSOLE_INHERITS_METHOD (msprinter, mswindows, valid_color_name_p); | |
2527 | 2324 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_list); |
440 | 2325 |
2326 CONSOLE_HAS_METHOD (msprinter, initialize_font_instance); | |
2327 /* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_font_instance); */ | |
2328 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_font_instance); | |
2329 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_font_instance); | |
442 | 2330 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_instance_truename); |
2527 | 2331 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_list); |
440 | 2332 #ifdef MULE |
2333 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_spec_matches_charset); | |
2334 CONSOLE_INHERITS_METHOD (msprinter, mswindows, find_charset_font); | |
2335 #endif | |
428 | 2336 } |
2337 | |
2338 void | |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
5024
diff
changeset
|
2339 reinit_vars_of_fontcolor_mswindows (void) |
788 | 2340 { |
2341 #ifdef MULE | |
2342 int i; | |
2343 | |
2344 unicode_subrange_table = xnew_array_and_zero (unicode_subrange_t, 128); | |
2345 for (i = 0; i < countof (unicode_subrange_raw_map); i++) | |
2346 { | |
2347 const unicode_subrange_raw_t *el = &unicode_subrange_raw_map[i]; | |
2348 if (unicode_subrange_table[el->subrange_bit].subranges == 0) | |
2349 unicode_subrange_table[el->subrange_bit].subranges = el; | |
2350 unicode_subrange_table[el->subrange_bit].no_subranges++; | |
2351 } | |
2352 | |
2353 Fclrhash (Vfont_signature_data); | |
2354 #endif /* MULE */ | |
2355 } | |
2356 | |
2357 void | |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
5024
diff
changeset
|
2358 vars_of_fontcolor_mswindows (void) |
428 | 2359 { |
788 | 2360 #ifdef MULE |
2361 Vfont_signature_data = | |
5191
71ee43b8a74d
Add #'equalp as a hash test by default; add #'define-hash-table-test, GNU API
Aidan Kehoe <kehoea@parhasard.net>
parents:
5182
diff
changeset
|
2362 make_lisp_hash_table (100, HASH_TABLE_NON_WEAK, Qequal); |
788 | 2363 staticpro (&Vfont_signature_data); |
2364 #endif /* MULE */ | |
428 | 2365 } |