Debian Codegraph @

T1lib/type1/t1chardump

raw ◀ ▶
1 Debian patch touch this file
•1 /*--------------------------------------------------------------------------
2 ----- File: t1chardump
3 ----- Author: Rainer Menzner ([email protected])
4 ----- Date: 2003-03-02
5 ----- Description: This file is part of the t1-library. It contains
6 code responsible for dumping outline data to a
7 PostScript file (used only for debugging.
8 ----- Copyright: t1lib is copyrighted (c) Rainer Menzner, 1996-2003.
9 As of version 0.5, t1lib is distributed under the
10 GNU General Public Library Lincense. The
11 conditions can be found in the files LICENSE and
12 LGPL, which should reside in the toplevel
13 directory of the distribution. Please note that
14 there are parts of t1lib that are subject to
15 other licenses:
16 The parseAFM-package is copyrighted by Adobe Systems
17 Inc.
18 The type1 rasterizer is copyrighted by IBM and the
19 X11-consortium.
20 ----- Warranties: Of course, there's NO WARRANTY OF ANY KIND :-)
21 ----- Credits: I want to thank IBM and the X11-consortium for making
22 their rasterizer freely available.
23 Also thanks to Piet Tutelaers for his ps2pk, from
24 which I took the rasterizer sources in a format
25 independent from X11.
26 Thanks to all people who make free software living!
27 --------------------------------------------------------------------------*/
28
29 fputs( "\
30 %!PS-Adobe-2.0 EPSF-1.2\n\
31 %%Creator: t1lib\n\
32 %%Title: Type1Char Character Dump\n\
33 %%Pages: 1\n\
34 %%PageOrder: Ascend\n\
35 %%BoundingBox: 0 0 596 842\n\
36 %%DocumentPaperSizes: a4\n\
37 %%EndComments\n\
38 %!\n\
39 /T1LibDict 100 dict def \n\
40 T1LibDict begin\n\
41 % Setup the size from the type1 module\n\
42 /t1SetupSize {\n\
43 /size exch def\n\
44 } def\n\
45 \n\
46 % Prepare the page. Compute scales and fill the charspace unit square\n\
47 % background\n\
48 /t1PreparePage {\n\
49 \n\
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
51 %\n\
52 % Start of Customizable Section\n\
53 %\n\
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
55 \n\
56 % Setup a standard linewidth\n\
57 /t1dumpstdlinewidth 1.0 def\n\
58 % Setup a scale for drawing direction arrows\n\
59 /arrowscale 3.0 def\n\
60 \n\
61 % Should we draw the device pixel grid? (1=yes, otherwise no)\n\
62 /t1drawgrid 1 def\n\
63 % Should we draw stems? (1=yes, otherwise no)\n\
64 /t1drawstems 1 def\n\
65 % Should we draw alignment zones? (1=yes, otherwise no)\n\
66 /t1drawzones 1 def\n\
67 % Should we fill the charspace unit square? (1=yes, otherwise no)\n\
68 /t1fillunitsquare 1 def\n\
69 % Should we fill the device page? (1=yes, otherwise no)\n\
70 /t1fillpage 1 def\n\
71 % Should we show path segment On-Curve points? (1=yes, otherwise no)\n\
72 /t1showoncurvepoints 1 def\n\
73 % Should we show path segment Off Curve points? (1=yes, otherwise no)\n\
74 /t1showoffcurvepoints 1 def\n\
75 % Should we show Bezier tangets and their defining points? (1=yes, otherwise no)\n\
76 /t1showbeziertangents 1 def\n\
77 \n\
78 % Define a few colors\n\
79 /t1linecolor { 0.0 0.0 0.0 } def\n\
80 /t1hlinecolor { 1.0 0.0 0.0 } def\n\
81 /t1slinecolor { 1.0 1.0 1.0 } def\n\
82 /t1movecolor { 0.0 0.0 0.0 } def\n\
83 /t1hmovecolor { 1.0 0.0 0.0 } def\n\
84 /t1smovecolor { 1.0 1.0 1.0 } def\n\
85 /t1curvecolor { 0.0 0.0 0.0 } def\n\
86 /t1hcurvecolor { 1.0 0.0 0.0 } def\n\
87 /t1scurvecolor { 0.0 0.0 1.0 } def\n\
88 /t1sprolongatecolor { 1.0 0.0 1.0 } def\n\
89 /t1stemcolor { 0.0 0.0 1.0 } def\n\
90 /t1alignedstemcolor { 1.0 0.0 1.0 } def\n\
91 /t1bottomzonecolor { 1.0 1.0 0.0 } def\n\
92 /t1topzonecolor { 1.0 1.0 0.0 } def\n\
93 /t1arrowcolor { 0.0 0.0 0.0 } def\n\
94 /t1harrowcolor { 1.0 0.0 0.0 } def\n\
95 /t1sarrowcolor { 0.0 0.0 1.0 } def\n\
96 /t1sbwcolor { 0.0 0.0 0.0 } def\n\
97 /t1closepathcolor { 0.0 0.0 0.0 } def\n\
98 /t1hclosepathcolor { 1.0 0.0 0.0 } def\n\
99 /t1sclosepathcolor { 0.0 0.0 1.0 } def\n\
100 /t1pagecolor { 0.7 0.7 0.7 } def\n\
101 /t1unitsquarecolor { 0.4 0.4 0.4 } def\n\
102 /t1gridcolor { 0.0 0.0 0.0 } def\n\
103 \n\
104 % Line scale relative to the standard linewidth
105 /t1linescale 0.4 def\n\
106 /t1hlinescale 0.4 def\n\
107 /t1slinescale 0.4 def\n\
108 /t1movescale 0.4 def\n\
109 /t1hmovescale 0.4 def\n\
110 /t1smovescale 0.4 def\n\
111 /t1curvescale 0.4 def\n\
112 /t1hcurvescale 0.4 def\n\
113 /t1scurvescale 0.4 def\n\
114 /t1curvetangentscale 0.5 def\n\
115 /t1sprolongatescale 0.4 def\n\
116 /t1stemscale 0.5 def\n\
117 /t1alignedstemscale 0.5 def\n\
118 /t1bottomzonescale 0.5 def\n\
119 /t1topzonescale 0.5 def\n\
120 /t1closepathscale 0.4 def\n\
121 /t1hclosepathscale 0.4 def\n\
122 /t1sclosepathscale 0.4 def\n\
123 /t1gridscale 0.5 def\n\
124 \n\
125 % Line dash specifications (stems and zones are not configurable!)
126 /t1linedash { [] 0 } def\n\
127 /t1hlinedash { [] 0 } def\n\
128 /t1slinedash { [] 0 } def\n\
129 /t1movedash { [2 2] 0 } def\n\
130 /t1hmovedash { [2 2] 0 } def\n\
131 /t1smovedash { [2 2] 0 } def\n\
132 /t1curvedash { [] 0 } def\n\
133 /t1hcurvedash { [] 0 } def\n\
134 /t1scurvedash { [] 0 } def\n\
135 /t1sprolongatedash { [1 1] 0 }def\n\
136 /t1closepathdash { [] 0 } def\n\
137 /t1hclosepathdash { [] 0 } def\n\
138 /t1sclosepathdash { [] 0 } def\n\
139 /t1griddash { [3 3] 0 } def\n\
140 \n\
141 % Define a clipping rectangle ROI (in charspace coordinates)\n\
142 /t1ROIxmin -200 def\n\
143 /t1ROIxmax 1200 def\n\
144 /t1ROIymin -500 def\n\
145 /t1ROIymax 1200 def\n\
146 \n\
147 % Device values (in bp). These must match the Bounding Box Statement!\n\
148 /xmindev 0 neg def\n\
149 /xmaxdev 596 def\n\
150 /ymindev 0 neg def\n\
151 /ymaxdev 842 def\n\
152 /dxdev 1 def\n\
153 /dydev 1 def\n\
154 \n\
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
156 %\n\
157 % End of Customizable Section\n\
158 %\n\
159 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
160 \n\
161 % logical pixel values\n\
162 /xminpixel t1ROIxmin 1000.0 div size mul def\n\
163 /xmaxpixel t1ROIxmax 1000.0 div size mul def\n\
164 /yminpixel t1ROIymin 1000.0 div size mul def\n\
165 /ymaxpixel t1ROIymax 1000.0 div size mul def\n\
166 /dxpixel 1 def\n\
167 /dypixel 1 def\n\
168 \n\
169 % compute scales and set minimum scale\n\
170 /scalex xmaxdev xmindev sub xmaxpixel xminpixel sub div def\n\
171 /scaley ymaxdev ymindev sub ymaxpixel yminpixel sub div def\n\
172 scalex scaley gt { /scale scaley def } { /scale scalex def } ifelse\n\
173 \n\
174 % Fill device page\n\
175 xmindev ymindev moveto\n\
176 xmaxdev 0 rlineto\n\
177 0 ymaxdev rlineto\n\
178 xmaxdev neg 0 rlineto\n\
179 0 ymaxdev neg rlineto\n\
180 closepath\n\
181 clip\n\
182 t1fillpage 1 eq\n\
183 {\n\
184 t1pagecolor setrgbcolor\n\
185 fill\n\
186 } if\n\
187 \n\
188 % reassign device values\n\
189 /xmindev xminpixel scale mul def\n\
190 /xmaxdev xmaxpixel scale mul def\n\
191 /ymindev yminpixel scale mul def\n\
192 /ymaxdev ymaxpixel scale mul def\n\
193 /dxdev dxpixel scale mul def\n\
194 /dydev dypixel scale mul def\n\
195 \n\
196 % translate coordinate system \n\
197 xminpixel scale mul neg yminpixel scale mul neg translate\n\
198 \n\
199 % Fill unit square of charspace coordinate system \n\
200 t1fillunitsquare 1 eq\n\
201 {\n\
202 t1unitsquarecolor setrgbcolor\n\
203 0 0 moveto\n\
204 size scale mul 0 rlineto\n\
205 0 size scale mul rlineto\n\
206 size scale mul neg 0 rlineto\n\
207 0 size scale mul neg rlineto\n\
208 closepath fill\n\
209 } if\n\
210 } def\n\
211 \n\
212 /t1FinishPage {\n\
213 t1drawgrid 1 eq\n\
214 {\n\
215 t1gridcolor setrgbcolor\n\
216 t1gridscale setlinewidth\n\
217 t1griddash setdash\n\
218 % draw grid and align to the point (0,0)\n\
219 0 dxdev xmaxdev {\n\
220 /xval exch def\n\
221 xval ymindev moveto\n\
222 xval ymaxdev lineto\n\
223 stroke\n\
224 } for\n\
225 0 dxdev neg xmindev {\n\
226 /xval exch def\n\
227 xval ymindev moveto\n\
228 xval ymaxdev lineto\n\
229 stroke\n\
230 } for\n\
231 0 dydev ymaxdev {\n\
232 /yval exch def\n\
233 xmindev yval moveto\n\
234 xmaxdev yval lineto\n\
235 stroke\n\
236 } for\n\
237 0 dydev neg ymindev {\n\
238 /yval exch def\n\
239 xmindev yval moveto\n\
240 xmaxdev yval lineto\n\
241 stroke\n\
242 } for\n\
243 } if\n\
244 } def\n\
245 \n\
246 % Define three arrow routines available for later providing the output with directions\n\
247 /t1arrowhead {\n\
248 /tmpy exch def\n\
249 /tmpx exch def\n\
250 gsave\n\
251 t1arrowcolor setrgbcolor\n\
252 currx curry translate\n\
253 tmpy tmpx atan rotate\n\
254 newpath\n\
255 0 0 moveto\n\
256 0 2 arrowscale currentlinewidth neg mul mul rlineto\n\
257 6 arrowscale currentlinewidth mul mul 2 arrowscale currentlinewidth mul mul rlineto\n\
258 6 arrowscale currentlinewidth mul mul neg 2 arrowscale currentlinewidth mul mul rlineto\n\
259 closepath\n\
260 fill\n\
261 grestore\n\
262 tmpx\n\
263 tmpy\n\
264 } def\n\
265 /t1harrowhead {\n\
266 /tmpy exch def\n\
267 /tmpx exch def\n\
268 gsave\n\
269 t1harrowcolor setrgbcolor\n\
270 currhx currhy translate\n\
271 tmpy tmpx atan rotate\n\
272 newpath\n\
273 0 0 moveto\n\
274 0 2 arrowscale currentlinewidth neg mul mul rlineto\n\
275 6 arrowscale currentlinewidth mul mul 2 arrowscale currentlinewidth mul mul rlineto\n\
276 6 arrowscale currentlinewidth mul mul neg 2 arrowscale currentlinewidth mul mul rlineto\n\
277 closepath\n\
278 fill\n\
279 grestore\n\
280 tmpx\n\
281 tmpy\n\
282 } def\n\
283 /t1sarrowhead {\n\
284 /tmpy exch def\n\
285 /tmpx exch def\n\
286 gsave\n\
287 t1sarrowcolor setrgbcolor\n\
288 currsx currsy translate\n\
289 tmpy tmpx atan rotate\n\
290 newpath\n\
291 0 0 moveto\n\
292 0 2 arrowscale currentlinewidth neg mul mul rlineto\n\
293 6 arrowscale currentlinewidth mul mul 2 arrowscale currentlinewidth mul mul rlineto\n\
294 6 arrowscale currentlinewidth mul mul neg 2 arrowscale currentlinewidth mul mul rlineto\n\
295 closepath\n\
296 fill\n\
297 grestore\n\
298 tmpx\n\
299 tmpy\n\
300 } def\n\
301 \n\
302 /t1rlineto {\n\
303 /y2 exch scale mul def\n\
304 /x2 exch scale mul def\n\
305 t1linecolor setrgbcolor\n\
306 t1linedash setdash\n\
307 t1linescale t1dumpstdlinewidth mul setlinewidth\n\
308 t1showoncurvepoints 1 eq\n\
309 {\n\
310 newpath currx x2 add curry y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
311 } if\n\
312 currx curry moveto\n\
313 x2 y2 rlineto\n\
314 stroke\n\
315 /currx currx x2 add def\n\
316 /curry curry y2 add def\n\
317 } def\n\
318 \n\
319 /t1srlineto {\n\
320 /y2 exch scale mul def\n\
321 /x2 exch scale mul def\n\
322 t1slinecolor setrgbcolor\n\
323 t1slinedash setdash\n\
324 t1slinescale t1dumpstdlinewidth mul setlinewidth\n\
325 t1showoncurvepoints 1 eq\n\
326 {\n\
327 newpath currsx x2 add currsy y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
328 } if\n\
329 currsx currsy moveto\n\
330 x2 y2 rlineto\n\
331 stroke\n\
332 /currsx currsx x2 add def\n\
333 /currsy currsy y2 add def\n\
334 } def\n\
335 \n\
336 /t1sprolongate {\n\
337 /y2 exch scale mul def\n\
338 /x2 exch scale mul def\n\
339 t1sprolongatecolor setrgbcolor\n\
340 t1sprolongatedash setdash\n\
341 t1sprolongatescale t1dumpstdlinewidth mul setlinewidth\n\
342 t1showoncurvepoints 1 eq\n\
343 {\n\
344 newpath currsx x2 add currsy y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
345 } if\n\
346 currsx currsy moveto\n\
347 x2 y2 rlineto\n\
348 stroke\n\
349 /currsx currsx x2 add def\n\
350 /currsy currsy y2 add def\n\
351 } def\n\
352 \n\
353 /t1hintedrlineto {\n\
354 /y2 exch scale mul def\n\
355 /x2 exch scale mul def\n\
356 t1hlinecolor setrgbcolor\n\
357 t1hlinedash setdash\n\
358 t1hlinescale t1dumpstdlinewidth mul setlinewidth\n\
359 t1showoncurvepoints 1 eq\n\
360 {\n\
361 newpath currhx x2 add currhy y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
362 } if\n\
363 currhx currhy moveto\n\
364 x2 y2 rlineto\n\
365 stroke\n\
366 /currhx currhx x2 add def\n\
367 /currhy currhy y2 add def\n\
368 } def\n\
369 \n\
370 /t1rmoveto {\n\
371 /y2 exch scale mul def\n\
372 /x2 exch scale mul def\n\
373 t1movecolor setrgbcolor\n\
374 t1movedash setdash\n\
375 t1movescale t1dumpstdlinewidth mul setlinewidth\n\
376 t1showoncurvepoints 1 eq\n\
377 {\n\
378 newpath currx x2 add curry y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
379 } if\n\
380 currx curry moveto\n\
381 x2 y2 rlineto\n\
382 stroke\n\
383 /currx currx x2 add def\n\
384 /curry curry y2 add def\n\
385 /startx currx def\n\
386 /starty curry def\n\
387 } def\n\
388 \n\
389 /t1srmoveto {\n\
390 /y2 exch scale mul def\n\
391 /x2 exch scale mul def\n\
392 t1smovecolor setrgbcolor\n\
393 t1smovedash setdash\n\
394 t1smovescale t1dumpstdlinewidth mul setlinewidth\n\
395 t1showoncurvepoints 1 eq\n\
396 {\n\
397 newpath currsx x2 add currsy y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
398 } if\n\
399 currsx currsy moveto\n\
400 x2 y2 rlineto\n\
401 stroke\n\
402 /currsx currsx x2 add def\n\
403 /currsy currsy y2 add def\n\
404 /startsx currsx def\n\
405 /startsy currsy def\n\
406 } def\n\
407 \n\
408 /t1hintedrmoveto {\n\
409 /y2 exch scale mul def\n\
410 /x2 exch scale mul def\n\
411 t1hmovecolor setrgbcolor\n\
412 t1hmovedash setdash\n\
413 t1hmovescale t1dumpstdlinewidth mul setlinewidth\n\
414 t1showoncurvepoints 1 eq\n\
415 {\n\
416 newpath currhx x2 add currhy y2 add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
417 } if\n\
418 currhx currhy moveto\n\
419 x2 y2 rlineto\n\
420 stroke\n\
421 /currhx currhx x2 add def\n\
422 /currhy currhy y2 add def\n\
423 /starthx currhx def\n\
424 /starthy currhy def\n\
425 } def\n\
426 \n\
427 /t1rrcurveto {\n\
428 /y4 exch scale mul def\n\
429 /x4 exch scale mul def\n\
430 /y3 exch scale mul def\n\
431 /x3 exch scale mul def\n\
432 /y2 exch scale mul def\n\
433 /x2 exch scale mul def\n\
434 t1curvecolor setrgbcolor\n\
435 t1curvedash setdash\n\
436 t1curvescale t1dumpstdlinewidth mul setlinewidth\n\
437 t1showoffcurvepoints 1 eq\n\
438 {\n
439 newpath currx x2 add curry y2 add 1.0 currentlinewidth mul 0 360 arc closepath fill\n\
440 newpath currx x2 x3 add add curry y2 y3 add add 1.0 currentlinewidth mul 0 360 arc closepath fill\n\
441 } if\n\
442 t1showoncurvepoints 1 eq\n\
443 {\n\
444 newpath currx x2 x3 x4 add add add curry y2 y3 y4 add add add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
445 } if\n\
446 t1showbeziertangents 1 eq\n\
447 {\n\
448 [2 2] 0 setdash\n\
449 t1curvetangentscale currentlinewidth mul setlinewidth\n\
450 currx curry moveto\n\
451 currx x2 add curry y2 add lineto\n\
452 stroke\n\
453 currx x2 x3 add add curry y2 y3 add add moveto\n\
454 currx x2 x3 x4 add add add curry y2 y3 y4 add add add lineto\n\
455 stroke\n\
456 } if\n\
457 t1curvedash setdash\n\
458 t1curvescale t1dumpstdlinewidth mul setlinewidth\n\
459 currx curry moveto\n\
460 x2 y2 x2 x3 add y2 y3 add x2 x3 x4 add add y2 y3 y4 add add rcurveto\n\
461 stroke\n\
462 /currx currx x2 x3 x4 add add add def\n\
463 /curry curry y2 y3 y4 add add add def\n\
464 } def\n\
465 \n\
466 /t1srrcurveto {\n\
467 /y4 exch scale mul def\n\
468 /x4 exch scale mul def\n\
469 /y3 exch scale mul def\n\
470 /x3 exch scale mul def\n\
471 /y2 exch scale mul def\n\
472 /x2 exch scale mul def\n\
473 t1scurvecolor setrgbcolor\n\
474 t1scurvedash setdash\n\
475 t1scurvescale t1dumpstdlinewidth mul setlinewidth\n\
476 t1showoffcurvepoints 1 eq\n\
477 {\n\
478 newpath currsx x2 add currsy y2 add 1.0 currentlinewidth mul 0 360 arc closepath fill\n\
479 newpath currsx x2 x3 add add currsy y2 y3 add add 1.0 currentlinewidth mul 0 360 arc closepath fill\n\
480 } if\n\
481 t1showoncurvepoints 1 eq\n\
482 {\n\
483 newpath currsx x2 x3 x4 add add add currsy y2 y3 y4 add add add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
484 } if\n\
485 t1showbeziertangents 1 eq\n\
486 {\n\
487 [2 2] 0 setdash\n\
488 t1curvetangentscale currentlinewidth mul setlinewidth\n\
489 currsx currsy moveto\n\
490 currsx x2 add currsy y2 add lineto\n\
491 stroke\n\
492 currsx x2 x3 add add currsy y2 y3 add add moveto\n\
493 currsx x2 x3 x4 add add add currsy y2 y3 y4 add add add lineto\n\
494 stroke\n\
495 } if\n\
496 t1scurvedash setdash\n\
497 t1scurvescale t1dumpstdlinewidth mul setlinewidth\n\
498 currsx currsy moveto\n\
499 x2 y2 x2 x3 add y2 y3 add x2 x3 x4 add add y2 y3 y4 add add rcurveto\n\
500 stroke\n\
501 /currsx currsx x2 x3 x4 add add add def\n\
502 /currsy currsy y2 y3 y4 add add add def\n\
503 } def\n\
504 \n\
505 /t1hintedrrcurveto {\n\
506 /y4 exch scale mul def\n\
507 /x4 exch scale mul def\n\
508 /y3 exch scale mul def\n\
509 /x3 exch scale mul def\n\
510 /y2 exch scale mul def\n\
511 /x2 exch scale mul def\n\
512 t1hcurvecolor setrgbcolor\n\
513 t1hcurvedash setdash\n\
514 t1hcurvescale t1dumpstdlinewidth mul setlinewidth\n\
515 t1showoncurvepoints 1 eq\n\
516 {\n\
517 newpath currhx x2 add currhy y2 add 1.0 currentlinewidth mul 0 360 arc closepath fill\n\
518 newpath currhx x2 x3 add add currhy y2 y3 add add 1.0 currentlinewidth mul 0 360 arc closepath fill\n\
519 } if\n\
520 t1showoncurvepoints 1 eq\n\
521 {\n\
522 newpath currhx x2 x3 x4 add add add currhy y2 y3 y4 add add add 1.5 currentlinewidth mul 0 360 arc closepath fill\n\
523 } if\n\
524 t1showbeziertangents 1 eq\n\
525 {\n\
526 [2 2] 0 setdash\n\
527 t1curvetangentscale currentlinewidth mul setlinewidth\n\
528 currhx currhy moveto\n\
529 currhx x2 add currhy y2 add lineto\n\
530 stroke\n\
531 currhx x2 x3 add add currhy y2 y3 add add moveto\n\
532 currhx x2 x3 x4 add add add currhy y2 y3 y4 add add add lineto\n\
533 stroke\n\
534 } if\n\
535 t1hcurvedash setdash\n\
536 t1hcurvescale t1dumpstdlinewidth mul setlinewidth\n\
537 currhx currhy moveto\n\
538 x2 y2 x2 x3 add y2 y3 add x2 x3 x4 add add y2 y3 y4 add add rcurveto\n\
539 stroke\n\
540 /currhx currhx x2 x3 x4 add add add def\n\
541 /currhy currhy y2 y3 y4 add add add def\n\
542 } def\n\
543 \n\
544 /t1sbw {\n\
545 /wy exch scale mul def\n\
546 /wx exch scale mul def\n\
547 /sby exch scale mul def\n\
548 /sbx exch scale mul def\n\
549 t1sbwcolor setrgbcolor\n\
550 newpath sbx sby 3 0 360 arc closepath fill\n\
551 newpath wx wy 3 0 360 arc closepath fill\n\
552 /currx sbx def\n\
553 /curry sby def\n\
554 /currhx sbx def\n\
555 /currhy sby def\n\
556 /currsx sbx def\n\
557 /currsy sby def\n\
558 } def\n\
559 \n\
560 /t1closepath {\n\
561 t1closepathdash setdash\n\
562 t1closepathscale t1dumpstdlinewidth mul setlinewidth\n\
563 t1closepathcolor setrgbcolor\n\
564 currx curry moveto\n\
565 startx starty lineto\n\
566 stroke\n\
567 } def\n\
568 \n\
569 /t1sclosepath {\n\
570 t1sclosepathdash setdash\n\
571 t1sclosepathscale t1dumpstdlinewidth mul setlinewidth\n\
572 t1sclosepathcolor setrgbcolor\n\
573 currsx currsy moveto\n\
574 startsx startsy lineto\n\
575 stroke\n\
576 } def\n\
577 \n\
578 /t1hintedclosepath {\n\
579 t1hclosepathdash setdash\n\
580 t1hclosepathscale t1dumpstdlinewidth mul setlinewidth\n\
581 t1hclosepathcolor setrgbcolor\n\
582 currhx currhy moveto\n\
583 starthx starthy lineto\n\
584 stroke\n\
585 } def\n\
586 \n\
587 /t1vstem {\n\
588 t1drawstems 1 eq\n\
589 {\n\
590 /stemwidth exch scale mul def\n\
591 /stemstart exch scale mul def\n\
592 t1stemscale t1dumpstdlinewidth mul setlinewidth\n\
593 t1stemcolor setrgbcolor\n\
594 [] 0 setdash\n\
595 stemstart ymindev moveto\n\
596 stemstart ymaxdev lineto\n\
597 stroke\n\
598 [2 2] 0 setdash\n\
599 stemwidth stemstart add ymindev moveto\n\
600 stemwidth stemstart add ymaxdev lineto\n\
601 stroke\n\
602 } if\n\
603 } def\n\
604 \n\
605 /t1alignedvstem {\n\
606 t1drawstems 1 eq\n\
607 {\n\
608 /stemwidth exch scale mul def\n\
609 /stemstart exch scale mul def\n\
610 t1alignedstemscale t1dumpstdlinewidth mul setlinewidth\n\
611 t1alignedstemcolor setrgbcolor\n\
612 [] 0 setdash\n\
613 stemstart ymindev moveto\n\
614 stemstart ymaxdev lineto\n\
615 stroke\n\
616 [2 2] 0 setdash\n\
617 stemwidth stemstart add ymindev moveto\n\
618 stemwidth stemstart add ymaxdev lineto\n\
619 stroke\n\
620 } if\n\
621 } def\n\
622 \n\
623 /t1hstem {\n\
624 t1drawstems 1 eq\n\
625 {\n\
626 /stemwidth exch scale mul def\n\
627 /stemstart exch scale mul def\n\
628 t1stemscale t1dumpstdlinewidth mul setlinewidth\n\
629 t1stemcolor setrgbcolor\n\
630 [] 0 setdash\n\
631 xmindev stemstart moveto\n\
632 xmaxdev stemstart lineto\n\
633 stroke\n\
634 [2 2] 0 setdash\n\
635 xmindev stemwidth stemstart add moveto\n\
636 xmaxdev stemwidth stemstart add lineto\n\
637 stroke\n\
638 } if\n\
639 } def\n\
640 \n\
641 /t1alignedhstem {\n\
642 t1drawstems 1 eq\n\
643 {\n\
644 /stemwidth exch scale mul def\n\
645 /stemstart exch scale mul def\n\
646 t1alignedstemscale t1dumpstdlinewidth mul setlinewidth\n\
647 t1alignedstemcolor setrgbcolor\n\
648 [] 0 setdash\n\
649 xmindev stemstart moveto\n\
650 xmaxdev stemstart lineto\n\
651 stroke\n\
652 [2 2] 0 setdash\n\
653 xmindev stemwidth stemstart add moveto\n\
654 xmaxdev stemwidth stemstart add lineto\n\
655 stroke\n\
656 } if\n\
657 } def\n\
658 \n\
659 /t1bottomzone {\n\
660 t1drawzones 1 eq\n\
661 {\n\
662 /bottom exch scale mul def\n\
663 /top exch scale mul def\n\
664 t1bottomzonescale t1dumpstdlinewidth mul setlinewidth\n\
665 t1bottomzonecolor setrgbcolor\n\
666 [] 0 setdash\n\
667 xmindev bottom moveto\n\
668 xmaxdev bottom lineto\n\
669 stroke\n\
670 [2 2] 0 setdash\n\
671 xmindev top moveto\n\
672 xmaxdev top lineto\n\
673 stroke\n\
674 } if\n\
675 } def\n\
676 \n\
677 /t1topzone {\n\
678 t1drawzones 1 eq\n\
679 {\n\
680 /bottom exch scale mul def\n\
681 /top exch scale mul def\n\
682 t1topzonescale t1dumpstdlinewidth mul setlinewidth\n\
683 t1topzonecolor setrgbcolor\n\
684 [2 2] 0 setdash\n\
685 xmindev bottom moveto\n\
686 xmaxdev bottom lineto\n\
687 stroke\n\
688 [] 0 setdash\n\
689 xmindev top moveto\n\
690 xmaxdev top lineto\n\
691 stroke\n\
692 } if\n\
693 } def\n\
694 \n\
695 end\n\
696 \n\
697 % Next follows drawing code from charstring commands:\n", fp);