blob: 45bee8464eb9d932283ec0f58aeae421ab6d1f0e (
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
%!PS-Adobe-2.0
%
% Listing up Hankaku characters
% 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
/SHOW_BYTE_CHARS
{
/LEFT 150 def
/TOP 675 def
/SIZE 40 def
/FONT_WIDTH 500 def
/FONT_DESCENT 120 def
/FONT_ASCENT 880 def
/FONT_HEIGHT FONT_ASCENT FONT_DESCENT add def
% Initialize
dup findfont SIZE scalefont /FONT exch def
32 string cvs /FONT_NAME exch def
/FONT_WIDTH FONT_WIDTH 1000 div SIZE mul def
/FONT_DESCENT FONT_DESCENT 1000 div SIZE mul def
/FONT_ASCENT FONT_ASCENT 1000 div SIZE mul def
/FONT_HEIGHT FONT_HEIGHT 1000 div SIZE mul def
/DIGIT_FONT /Courier findfont SIZE 0.8 mul scalefont def
/DIGIT_WIDTH gsave DIGIT_FONT setfont (0) stringwidth pop def grestore
/DIGIT_OFFSET FONT_WIDTH DIGIT_WIDTH sub 2 div def
/STR1 1 string def
% draw title
/Times-Roman findfont SIZE scalefont setfont
FONT_WIDTH 16 mul FONT_NAME stringwidth pop sub 2 div LEFT add
TOP SIZE 1.5 mul add moveto FONT_NAME show
% draw glid
0 1 16 {
dup FONT_WIDTH mul LEFT add TOP moveto
0 FONT_HEIGHT 16 mul neg rlineto
dup FONT_HEIGHT mul TOP exch sub LEFT exch moveto
FONT_WIDTH 16 mul 0 rlineto
pop
} for
stroke
% show character codes
DIGIT_FONT setfont
0 1 15 {
dup 16 STR1 cvrs pop
dup FONT_WIDTH mul LEFT add DIGIT_OFFSET add
TOP FONT_DESCENT add moveto STR1 show
dup FONT_HEIGHT mul TOP exch sub FONT_ASCENT sub
LEFT FONT_WIDTH 2 mul sub exch moveto STR1 show (0) show
pop
} for
% show characters
FONT setfont
0 1 15 {
/ROW exch def
0 1 15 {
/COLUMN exch def
STR1 0 ROW 16 mul COLUMN add put
LEFT COLUMN FONT_WIDTH mul add
TOP ROW FONT_HEIGHT mul sub FONT_ASCENT sub moveto
{ STR1 show } stopped {
.clearerror
0 FONT_ASCENT rmoveto
FONT_WIDTH FONT_HEIGHT neg rlineto
FONT_WIDTH neg 0 rmoveto
FONT_WIDTH FONT_HEIGHT rlineto stroke
} if
} for
} for
showpage
} def
[ /Ryumin-Light.Roman
/Ryumin-Light.Hankaku
/Ryumin-Light.Hiragana
/Ryumin-Light.Katakana
/Ryumin-Light-RKSJ-H ]
{
SHOW_BYTE_CHARS
} forall
|