1 % Copyright (C) 1993 Aladdin Enterprises. All rights reserved.
3 % This software is provided AS-IS with no warranty, either express or
6 % This software is distributed under license and may not be copied,
7 % modified or distributed except as expressly authorized under the terms
8 % of the license contained in the file LICENSE in this distribution.
10 % For more information about licensing, please refer to
11 % http://www.ghostscript.com/licensing/. For information on
12 % commercial licensing, go to http://www.artifex.com/licensing/ or
13 % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14 % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
16 % $Id: winmaps.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
17 % winmaps.ps - make maps between PostScript encodings and Windows
20 % Define the two Windows encodings.
23 ISOLatin1Encoding 256 array copy
24 dup 16#90 /.notdef put
25 16#93 1 16#9f { 2 copy /.notdef put pop } for
29 /.notdef /.notdef /.notdef /heart /diamond /club /spade /bullet
31 /.notdef /.notdef /.notdef /.notdef /paragraph /section /.notdef /.notdef
32 /arrowup /arrowdown /arrowright /arrowleft /.notdef /arrowboth /.notdef /.notdef
33 StandardEncoding 32 96 getinterval aload pop
34 /Ccedilla /udieresis /eacute /acircumflex /adieresis /agrave /aring /ccedilla
35 /ecircumflex /edieresis /egrave /idieresis /igrave /Adieresis /Aring
36 /Eacute /ae /AE /ocircumflex /odieresis /ograve /ucircumflex /ugrave
37 /ydieresis /Odieresis /Udieresis /cent /sterling /yen /.notdef /florin
38 /aacute /iacute /oacute /uacute /ntilde /Ntilde /ordfeminine /ordmasculine
39 /questiondown /.notdef /logicalnot /onehalf /onequarter /exclamdown /guillemotleft /guillemotright
40 48 { /.notdef } repeat
41 /alpha /beta /Gamma /Pi /Sigma /sigma /mu /tau
42 /Phi /Theta /Omega /delta /infinity /phi /element /intersection
43 /equivalence /plusminus /greaterequal /lessequal /integraltp /integralbt /divide /.notdef
44 /degree /dotmath /periodcentered /radical /.notdef /twosuperior /.notdef /.notdef
49 /invertencoding % <array> invertencoding <dict>
50 { 256 dict exch dup length 1 sub -1 0
51 { % stack: dict array index
52 2 copy get /.notdef ne
53 { 2 copy get exch 3 index 3 1 roll put }
60 /pmarray 256 array def
61 /printmap % <chars> <decode> printmap -
63 { 2 copy known { 1 index exch get } { pop 0 } ifelse exch
66 pmarray 0 counttomark 2 sub getinterval astore
67 ([) print dup length =only 0 exch (] = {\n ) exch
69 1 add 15 and dup 0 eq { (,\n ) } { (, ) } ifelse
71 forall pop pop (\n};\n) print pop
74 /decodeStd StandardEncoding invertencoding def
75 /decodeISO ISOLatin1Encoding
76 % Remove the redundant characters
78 [8#222 8#225 8#230 8#233 8#240] { 2 copy /.notdef put pop } forall
80 /decodeSym SymbolEncoding invertencoding def
82 /decodeANSI ANSIEncoding invertencoding def
83 /decodeOEM OEMEncoding invertencoding def
85 % Construct the map from Symbol to OEM.
87 (\nprivate const byte far_data gs_map_symbol_to_oem) print
88 SymbolEncoding decodeOEM printmap
90 % Construct the map from ISOLatin1 to OEM.
92 (\nprivate const byte far_data gs_map_iso_to_oem) print
93 ISOLatin1Encoding decodeOEM printmap
95 % Construct the map from Standard to ISOLatin1.
97 (\nprivate const byte far_data gs_map_std_to_iso) print
98 StandardEncoding decodeISO printmap
100 % Construct the map from ISOLatin1 to Standard.
101 % The Windows driver doesn't need this, but the X11 driver does.
103 (\nprivate const byte far_data gs_map_iso_to_std) print
104 ISOLatin1Encoding decodeStd printmap