Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/planix-v0/sys/lib/ghostscript/gs_kanji.ps – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
%    Copyright (C) 1994, 1995, 1996 Aladdin Enterprises.  All rights reserved.
2
% 
3
% This software is provided AS-IS with no warranty, either express or
4
% implied.
5
% 
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.
9
% 
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.
15
 
16
% $Id: gs_kanji.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
17
% Scaffolding for Kanji fonts.  This is based on the Wadalab free font
18
% from the University of Tokyo; it may not be appropriate for other
19
% Kanji fonts.
20
 
21
/currentglobal where
22
 { pop currentglobal { setglobal } true setglobal }
23
 { { } }
24
ifelse
25
 
26
% Define the encoding for the root font.
27
 
28
/KanjiEncoding
29
% \x00
30
 
31
 
32
 
33
 
34
% \x20
35
 
36
	8	0	0	0	0	0	0	0
37
	9	10	11	12	13	14	15	16
38
	17	18	19	20	21	22	23	24
39
% \x40
40
	25	26	27	28	29	30	31	32
41
	33	34	35	36	37	38	39	40
42
	41	42	43	44	45	46	47	48
43
	49	50	51	52	53	54	55	56
44
% \x60
45
	57	58	59	60	61	62	63	64
46
	65	66	67	68	69	70	71	72
47
	73	74	75	76	77	0	0	0
48
 
49
% \x80
50
 
51
 
52
 
53
 
54
% \xA0
55
 
56
	8	0	0	0	0	0	0	0
57
	9	10	11	12	13	14	15	16
58
	17	18	19	20	21	22	23	24
59
% \xC0
60
	25	26	27	28	29	30	31	32
61
	33	34	35	36	37	38	39	40
62
	41	42	43	44	45	46	47	48
63
	49	50	51	52	53	54	55	56
64
% \xE0
65
	57	58	59	60	61	62	63	64
66
	65	66	67	68	69	70	71	72
67
	73	74	75	76	77	0	0	0
68
 
69
256 packedarray def
70
 
71
% Define a stub for the base font encoding.
72
 
73
  /KanjiSubEncoding { /KanjiSubEncoding .findencoding } bind def
74
%% Replace 3 (gs_ksb_e.ps)
75
  EncodingDirectory /KanjiSubEncoding
76
   { (gs_ksb_e.ps) //systemdict begin runlibfile KanjiSubEncoding end }
77
  bind put
78
 
79
% Support procedures and data.
80
 
81
/T1FontInfo 8 dict begin
82
  /version (001.001) readonly def
83
  /FullName (KanjiBase) readonly def
84
  /FamilyName (KanjiBase) readonly def
85
  /Weight (Medium) readonly def
86
  /ItalicAngle 0 def
87
  /isFixedPitch false def
88
  /UnderlinePosition 0 def
89
  /UnderlineThickness 0 def
90
currentdict end readonly def
91
 
92
/T1NF			% <fontname> T1NF <font>
93
{
94
20 dict begin
95
  /FontName exch def
96
  /FontType 1 def
97
  /FontInfo T1FontInfo def
98
  /FontMatrix [.001 0 0 .001 0 0] def
99
  /FontBBox [0 0 1000 1000] def
100
  /Encoding KanjiSubEncoding def
101
  /CharStrings 150 dict def
102
  /PaintType 0 def
103
  /Private 2 dict def
104
  Private begin
105
    /BlueValues [] def
106
    /password 5839 def
107
  end
108
FontName currentdict end definefont
109
} def
110
 
111
/T0NF			% <fontname> T0NF <font>
112
{
113
20 dict begin
114
  /FontName exch def
115
  /FDepVector exch def
116
  /FontType 0 def
117
  /FontMatrix [1 0 0 1 0 0] def
118
  /FMapType 2 def
119
  /Encoding KanjiEncoding def
120
FontName currentdict end definefont
121
} def
122
 
123
% Define the composite font and all the base fonts.
124
 
125
/CompNF			% <fontname> CompNF <font>
126
{
127
/newname1 exch def
128
newname1 dup length string cvs /str exch def
129
str length /len exch def
130
/fdepvector 78 array def 
131
/j 1 def
132
16#21 1 16#74 {
133
/i exch def
134
KanjiEncoding i get 0 gt {
135
len 4 add string /newstr exch def
136
newstr 0 str putinterval
137
newstr len (.r) putinterval
138
newstr len 2 add  i 16 2 string cvrs putinterval
139
newstr cvn /newlit exch def
140
newlit T1NF /newfont exch def
141
fdepvector j newfont put
142
/j j 1 add def
143
} if
144
} for
145
fdepvector 0 fdepvector 1 get put
146
/j 0 def
147
fdepvector newname1 T0NF
148
} def
149
 
150
% Define an individual character in a composite font.
151
/CompD			% <charstring> <(HL)> CompD -
152
 { currentfont /Encoding get 1 index 0 get get	% FDepVector index
153
   currentfont /FDepVector get exch get		% base font
154
   dup /Encoding get 3 -1 roll 1 get get	% base font character name
155
   exch /CharStrings get exch 3 -1 roll put
156
 } bind def
157
 
158
exec