summaryrefslogtreecommitdiff
path: root/xc/doc/specs/BDF/fig1.ps
blob: f103baec7274fbaf34724d80d29c54dc66f11c49 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
%!PS-Adobe-1.0
mark
/inch {72 mul}def

/Helvetica findfont [10 0 0 10 0 0] makefont setfont

/ShowCache
   {$sc begin
    gsave
(Helvetica-Oblique) (/adobe/fonts/Helvetica/Oblique/)(j) 
0.0208333 -1.82131e-09 -1.82131e-09 -0.0208333 0 0 
22 9 7.5625 0 -2 -16  CachedChar
0 [6 8 ] Bits
1 [6 8 ] Bits
2 [6 8 ] Bits
3 [6 8 ] Bits
5 [5 7 ] Bits
6 [5 7 ] Bits
7 [5 7 ] Bits
8 [5 7 ] Bits
9 [4 6 ] Bits
10 [4 6 ] Bits
11 [4 6 ] Bits
12 [4 6 ] Bits
13 [4 6 ] Bits
14 [3 5 ] Bits
15 [3 5 ] Bits
16 [3 5 ] Bits
17 [3 5 ] Bits
18 [2 5 ] Bits
19 [1 4 ] Bits
20 [0 3 ] Bits
21 [0 2 ] Bits
 EndCachedChar
    grestore
    end
   } def

/$sc 120 dict def
$sc begin

/CN 100 string def
/CachedChar
   {/sl save def
    /yo exch def /xo exch def
    /yi exch def /xi exch def
    /wb exch def /hb exch def
    6 array astore /cmat exch def
    /cname exch def
    /fpath exch def
    /fname exch def
    DoScale 			% fit the character maximally onto the page
    Grid
    gsave
    DoLabs
    xo neg yo neg translate
    OrigMarks
   } def

/DoLabs
   {gsave
    /Helvetica findfont [1 0 0 1 0 0] makefont setfont
    0.1 setlinewidth
    newpath
    0 -1.5 moveto
    0.5 0.5 rmoveto -0.5 -0.5 rlineto 0.5 -0.5 rlineto
    0 -1.5 moveto wb -1.5 lineto
    -0.5 0.5 rmoveto 0.5 -0.5 rlineto -0.5 -0.5 rlineto
    stroke newpath
    wb 0.5 sub (BBw ) stringwidth pop sub -0.5 moveto 
    gsave 1 -1 scale (BBw) show grestore
    -1 0.5 moveto -1.5 0 lineto -2 0.5 lineto
    -1.5 0 moveto -1.5 hb lineto
    -0.5 -0.5 rmoveto 0.5 0.5 rlineto 0.5 -0.5 rlineto
    stroke newpath
    -1.5 (BBh ) stringwidth pop sub hb 1 sub moveto 
    gsave 1 -1 scale (BBh) show grestore
    xo neg -3 moveto 0 -3 lineto 
    0.5 0.5 rmoveto -0.5 -0.5 rlineto 0.5 -0.5 rlineto
    stroke newpath
    newpath
    xo neg -3 moveto
    gsave 1 -1 scale ( BBox) show grestore
    newpath
%    -3 yo neg moveto -3 0 lineto
%    0.5 0.5 rmoveto -0.5 -0.5 rlineto -0.5 0.5 rlineto
%    stroke newpath
    -4 yo neg moveto -4 hb lineto % ???? lower left??????
    -0.5 -0.5 rmoveto 0.5 0.5 rlineto 0.5 -0.5 rlineto
    stroke newpath
    -4 (BBoy ) stringwidth pop sub yo neg moveto
    gsave 1 -1 scale (BBoy) show grestore 
    grestore
   } def

/DoScale
   {3 72 mul hb div dup scale  	% hb == 3 inches
    0 hb translate
    1 -1 scale
   } def

/OrigMarks
   {gsave
    0 setgray
    .17 setlinewidth
    newpath 0 -1 moveto 0 1 lineto stroke
    newpath -1 0 moveto 1 0 lineto stroke
    .13 setlinewidth
    /xii xi round def
    newpath xii -.8 moveto 0 1.6 rlineto stroke
    newpath xii .8 sub 0 moveto 1.6 0 rlineto stroke
    grestore
   } def

/Bits
   {/xa exch def
    /yy exch yo add def
    gsave 0.2 setgray
    0 2 xa length 1 sub
       {/i exch def
	xa i get 1 xa i 1 add get
	   {/xx exch xo add def
	    newpath xx 0.2 add yy 0.2 add moveto 
	    0 0.6 rlineto 0.6 0 rlineto 0 -0.6 rlineto closepath fill
	   } for 
       } for
    grestore
   } def

/EndCachedChar
   {
    grestore
    sl restore
   } def

/Grid
   {gsave
    /wbround wb 8 div 0.5 add round cvi 8 mul def
    wbround 1 add 
       {newpath 0 0 moveto 0 hb lineto closepath fill
	1 0 translate 
	(-) print
       } repeat
    grestore
    gsave
    hb 1 add 
       {newpath 0 0 moveto wbround 0 lineto closepath fill
	0 1 translate
	(|) print
       } repeat
    grestore
    () = 
   } def
end

250 400 translate
ShowCache
cleartomark

showpage