summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/kanji/kbitmap.ps
blob: d4002e25f66d9ca5bd025980c0a1a34b56b5dc70 (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
%
% kbitmap.ps  -  define /bitmapkanji operator
%
% Apr. 6,1992 Programmed by N.Katayama
%

%
% font_name unique_id font_info image_proc BITMAPKANJI unique_id
%

/bitmapkanji {
	8 dict begin	% fontname, uniqueid, fontinfo, imageproc
			% imagematrix, imagestring, private and buildchar

	/imageproc exch def
	/fontinfo exch def
	/uniqueid exch def
	/fontname exch def
	/imagematrix matrix def
%	/imagestring 8000 string noaccess def
	/imagestring 10000 string noaccess def

	% Private dictionary

	/private 3 dict begin 
	/ImageMatrix imagematrix def
	/ImageString imagestring def
	/ImageProc /imageproc 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

		Private begin ImageMatrix ImageString ImageProc end 

		11 5 roll 0 -1000 500 880 16 -1 roll setmetrics2
		3 -1 roll pop false 3 1 roll imagepath

		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