annotate src/objects-msw.c @ 665:fdefd0186b75

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