summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/kanji/koutline.ps
blob: 24eac7004e692360cc152525d1a16d6db72ca68c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%
% koutline.ps  -  define /outlinekanji operator
%
% Apr. 6,1992 Programmed by N.Katayama
%
% Akira Tanaka <akr@jaist.ac.jp> modified for gs4.03/VFlib support. 1996/10/17
% Akira Tanaka <akr@jaist.ac.jp> modified for gs5.0/VFlib support. 1997/6/9
% Akira Tanaka <akr@jaist.ac.jp> modified for gs5.10/VFlib support. 1998/4/7

%
% font_name unique_id font_info path_proc OUTLINEKANJI unique_id
%

/outlinekanji {
	6 dict begin	% fontname, uniqueid, fontinfo, pathproc,
			% private and buildchar

	/pathproc exch def
	/fontinfo exch def
	/uniqueid exch def
	/fontname exch def

	% Private dictionary

	/private 1 dict begin 
	/PathProc /pathproc load def
	currentdict end def

	% Define BuildChar procedure

	/buildchar {		
		exch begin
		Encoding exch get dup Private /MappingProc get exec
		currentfont /WMode 2 copy known { get }{ pop pop 0 } ifelse

% Akira Tanaka <akr@jaist.ac.jp> modified for bogus speedup. 1998/05/17
		%gsave
		%2 copy Private /PathProc get exec
		%{ flattenpath pathbbox } stopped { .clearerror 0 0 0 0 } if
		%grestore
                0 -120 1000 880

		1000 0 6 2 roll 0 -1000 500 880 13 -1 roll setmetrics2
		Private /PathProc get exec
		PaintType 0 eq 
		{ eofill }{
			currentdict /StrokeWidth known
			{StrokeWidth}{0} ifelse
			setlinewidth stroke
		} ifelse
		end
	} bind def

	% Define base fonts

	fontname uniqueid fontinfo private /buildchar load basekanji
	/uniqueid exch def

	% Define composite fonts

	fontname fontinfo compositekanji

	uniqueid end
} def