Commit | Line | Data |
---|---|---|
69695f33 MW |
1 | /* Copyright 1995, 1996, 1997, 1998 by Arkkra Enterprises */ |
2 | ||
3 | #include <stdio.h> | |
4 | #include "globals.h" | |
5 | ||
6 | char *prolog_text[] = { | |
7 | "% Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004 by Arkkra Enterprises", | |
8 | "% All rights reserved", | |
9 | "", | |
10 | "% Mup PostScript Prolog 5.3 for use with Mup 5.3", | |
11 | "", | |
12 | "% lwid is used as the width of a standard (thin) line in the music", | |
13 | "% character definitions.", | |
14 | "/lwid 70 def", | |
15 | "/halflwid lwid 2 div def", | |
16 | "", | |
17 | "% Define the following for use in do_upshortnote, do_dnshortnote, and", | |
18 | "% do_shortrest; it has to be done outside of the music font definition.", | |
19 | "/utildict 10 dict def", | |
20 | "utildict begin", | |
21 | " /setnumflags { /numflags exch def } def", | |
22 | " /sethooksm1 { /hooksm1 exch def } def", | |
23 | " /setoffsets { /offsets exch def } def", | |
24 | " /setx { /x exch def } def", | |
25 | " /sety { /y exch def } def", | |
26 | "end", | |
27 | "", | |
28 | "% Define a music character font. Each music character is defined as if it", | |
29 | "% were a normal ASCII character in a strange font where \"A\" looks like a", | |
30 | "% treble clef, \"B\" looks like a bass clef, etc.", | |
31 | "", | |
32 | "/mfont0 100 dict def", | |
33 | "mfont0 begin", | |
34 | " /FontType 3 def", | |
35 | " /FontMatrix [ .001 0 0 0.001 0 0 ] def", | |
36 | " /FontBBox [ -2000 -4030 2000 4030 ] def", | |
37 | " /FontName (Mfont0) def", | |
38 | "", | |
39 | " % set up Encoding vector with standard names", | |
40 | " /Encoding 256 array def", | |
41 | " StandardEncoding Encoding copy", | |
42 | " pop", | |
43 | "", | |
44 | " % the following definitions are used for quarter rests", | |
45 | " /topx -170 def /topy 950 def", | |
46 | " /cor1x 250 def /cor1y 450 def", | |
47 | " /cor2x -300 def /cor2y 200 def", | |
48 | " /cor3x 250 def /cor3y -400 def", | |
49 | "", | |
50 | " % the following definitions are used for double sharps", | |
51 | " /limit 300 halflwid add def", | |
52 | " /off 70 def", | |
53 | " /inbendsmall limit 200 sub def", | |
54 | " /inbendbig limit 20 sub def", | |
55 | " /outbendsmall 100 def", | |
56 | " /outbendbig outbendsmall off add def", | |
57 | "", | |
58 | " %%%%% define routines that will be used by multiple characters %%%%%", | |
59 | " /do_1n {", | |
60 | " gsave", | |
61 | " newpath -10 rotate 1.6 1 scale", | |
62 | " 0 0 325 0 360 arc %outer ellipse", | |
63 | " 1 1.6 div 1 scale 10 rotate %back to original", | |
64 | " 35 rotate 0.85 1.1 scale", | |
65 | " 0 0 275 0 360 arc %inner ellipse", | |
66 | " eofill", | |
67 | " grestore", | |
68 | " } def", | |
69 | " /do_upflag {", | |
70 | " -315 0 moveto", | |
71 | " -300 100 -100 480 0 600 curveto", | |
72 | " 300 960 350 1500 200 1700 curveto", | |
73 | " 130 1700 lineto", | |
74 | " 350 1200 50 650 -315 600 curveto", | |
75 | " fill", | |
76 | " } def", | |
77 | " /do_flat {", | |
78 | " -250 -400 moveto %outer edge of loop", | |
79 | " 500 0 350 650 -250 160 curveto", | |
80 | " -250 160 lwid sub lineto %inner edge of loop", | |
81 | " 100 400 300 0 -250 -400 lwid add curveto", | |
82 | " fill", | |
83 | "", | |
84 | " lwid setlinewidth %stem", | |
85 | " -250 1100 moveto -250 -400 lineto stroke", | |
86 | " } def", | |
87 | " /do_diamond {", | |
88 | " newpath", | |
89 | " 420 0 moveto 0 300 lineto -420 0 lineto", | |
90 | " 0 -300 lineto closepath", | |
91 | " 259 -29 moveto -41 185 lineto -259 29 lineto", | |
92 | " 41 -185 lineto closepath", | |
93 | " eofill", | |
94 | " } def", | |
95 | " /do_2n {", | |
96 | " gsave", | |
97 | " newpath 25 rotate 1.4 1 scale", | |
98 | " 0 0 315 0 360 arc %outer ellipse", | |
99 | " 1 1.4 div 1 scale %back to original", | |
100 | " 1.3 0.5 scale", | |
101 | " 0 0 310 0 360 arc %inner ellipse", | |
102 | " eofill", | |
103 | " grestore", | |
104 | " } def", | |
105 | " /do_4n {", | |
106 | " gsave", | |
107 | " newpath 25 rotate 1.35 1 scale", | |
108 | " 0 0 310 0 360 arc fill", | |
109 | " grestore", | |
110 | " } def", | |
111 | " /do_com {", | |
112 | " newpath", | |
113 | " 330 250 150 0 360 arc fill %knob at upper right", | |
114 | " 465 300 moveto %outer boundary", | |
115 | " 410 500 200 635 0 635 curveto", | |
116 | " -750 635 -750 -635 0 -635 curveto", | |
117 | " 350 -635 480 -300 500 -100 curveto", | |
118 | " 430 -100 lineto %inner boundary", | |
119 | " 380 -300 250 -565 0 -565 curveto", | |
120 | " -450 -565 -450 565 0 565 curveto", | |
121 | " 200 565 370 350 395 300 curveto", | |
122 | " fill", | |
123 | " } def", | |
124 | " /do_ferm {", | |
125 | " 0 0 800 lwid sub 0 180 arc %inner arc", | |
126 | " -800 0 lineto", | |
127 | " 0 270 lwid sub 800 180 0 arcn %outer arc", | |
128 | " 800 0 lineto fill", | |
129 | " 0 120 120 0 360 arc fill %the dot", | |
130 | " } def", | |
131 | " /do_mor {", | |
132 | " gsave", | |
133 | " 0.7 1 scale %scrunch the following horizontally", | |
134 | " 45 rotate %to pretend all lines horz or vertical", | |
135 | " 0 1 1 {", | |
136 | " pop %we don't need the loop variable", | |
137 | " %one half of the mordent", | |
138 | " 0 40 moveto 350 40 lineto 350 -460 lineto", | |
139 | " 750 -460 lineto 750 -540 lineto", | |
140 | " 150 -540 lineto 150 -40 lineto", | |
141 | " 0 -40 lineto fill", | |
142 | " 180 rotate %to do the other half", | |
143 | " } for", | |
144 | " grestore", | |
145 | " } def", | |
146 | " /do_turn {", | |
147 | " gsave", | |
148 | " 0 1 1 {", | |
149 | " pop %we don't need the loop variable", | |
150 | " 0 -100 moveto %outer boundary", | |
151 | " 200 -400 625 -400 625 0 curveto", | |
152 | " 625 200 500 325 300 325 curveto", | |
153 | " 300 185 lineto %inner boundary", | |
154 | " 450 255 555 150 555 0 curveto", | |
155 | " 555 -350 250 -250 0 100 curveto", | |
156 | " fill", | |
157 | " 300 255 70 0 360 arc fill %knob on end", | |
158 | " 180 rotate %to do the other half", | |
159 | " } for", | |
160 | " grestore", | |
161 | " } def", | |
162 | "", | |
163 | " /do_upshortnote {", | |
164 | " utildict begin", | |
165 | " setnumflags %set numflags from the stack", | |
166 | " gsave", | |
167 | " -330 0 translate %half a flag width", | |
168 | " do_4n %do a quarter note head", | |
169 | " lwid setlinewidth", | |
170 | " 370 0 moveto", | |
171 | " 370 2100 numflags 2 sub flagsep mul add lineto stroke", | |
172 | " 670 2100 numflags 2 sub flagsep mul add translate", | |
173 | " 1 -1 scale %reflect across X axis", | |
174 | " 0 1 numflags 1 sub {", | |
175 | " do_upflag %do an upflag", | |
176 | " pop %we don't need the loop variable", | |
177 | " 0 flagsep translate", | |
178 | " } for", | |
179 | " grestore", | |
180 | " end", | |
181 | " } def", | |
182 | "", | |
183 | " /do_dnshortnote {", | |
184 | " utildict begin", | |
185 | " setnumflags %set numflags from the stack", | |
186 | " do_4n %do a quarter note head", | |
187 | " lwid setlinewidth", | |
188 | " -370 0 moveto", | |
189 | " -370 -2100 numflags 2 sub flagsep mul sub lineto stroke", | |
190 | " gsave", | |
191 | " -70 -2100 numflags 2 sub flagsep mul sub translate", | |
192 | " 0 1 numflags 1 sub {", | |
193 | " do_upflag %do an upflag", | |
194 | " pop %we don't need the loop variable", | |
195 | " 0 flagsep translate", | |
196 | " } for", | |
197 | " grestore", | |
198 | " end", | |
199 | " } def", | |
200 | "", | |
201 | " /do_shortrest {", | |
202 | " utildict begin", | |
203 | " sety setx setoffsets sethooksm1 %set variable from the stack", | |
204 | " gsave", | |
205 | " -105.8 offsets mul -600 offsets mul translate", | |
206 | " 0 1 hooksm1 { %loop once per hook", | |
207 | " newpath", | |
208 | " 1 setlinewidth", | |
209 | " gsave", | |
210 | " 1 1.2 scale", | |
211 | " -150 300 1.2 div 140 0 360 arc fill %the dot", | |
212 | " grestore", | |
213 | " lwid setlinewidth", | |
214 | " -50 700 550 255 315 arc %rest of the hook", | |
215 | " hooksm1 lt { stroke 105.8 600 translate } if", | |
216 | " } for", | |
217 | " x y lineto stroke", | |
218 | " grestore", | |
219 | " end", | |
220 | " } def", | |
221 | "", | |
222 | "", | |
223 | " % subsidiary dictionary of character definitions", | |
224 | " /CharStrings 128 dict def", | |
225 | " CharStrings begin", | |
226 | "", | |
227 | " /.notdef {} def", | |
228 | "", | |
229 | " % Here are the definitions of the characters. A stepsize here", | |
230 | " % is 300 units (assuming the character is drawn at its default", | |
231 | " % size).", | |
232 | "", | |
233 | " % gclef", | |
234 | " /A {", | |
235 | " newpath", | |
236 | " %start with inner curl, inside boundary", | |
237 | " -50 -300 moveto", | |
238 | " -450 600 700 700 750 0 curveto", | |
239 | " 750 -800 -700 -800 -700 200 curveto", | |
240 | " -700 900 500 1400 520 2250 curveto", | |
241 | " 520 2900 300 3000 200 3000 curveto", | |
242 | " 100 3000 -400 2500 -200 1800 curveto", | |
243 | " 350 -600 lineto", | |
244 | " 720 -1600 0 -1650 -400 -1400 curveto", | |
245 | "", | |
246 | " %go back to start, drawing the other boundary", | |
247 | " -400 -1480 lineto", | |
248 | " 0 -1700 800 -1700 430 -600 curveto", | |
249 | " -120 1800 lineto", | |
250 | " -300 2400 200 2800 250 2800 curveto", | |
251 | " 400 2800 430 2700 430 2450 curveto", | |
252 | " 430 1800 -900 1200 -900 300 curveto", | |
253 | " -750 -900 800 -900 850 0 curveto", | |
254 | " 900 1100 -750 900 -120 -300 curveto fill", | |
255 | "", | |
256 | " %circle at the bottom", | |
257 | " -300 -1250 250 0 360 arc fill", | |
258 | " } def", | |
259 | "", | |
260 | " % fclef", | |
261 | " /B {", | |
262 | " newpath", | |
263 | " %start with outside boundary, at bottom", | |
264 | " -1000 -1700 moveto", | |
265 | " 100 -1100 500 -600 450 0 curveto", | |
266 | " 450 850 -1100 850 -950 0 curveto", | |
267 | "", | |
268 | " %go back to start, drawing the other boundary", | |
269 | " -880 0 lineto", | |
270 | " -920 400 -600 560 -300 560 curveto", | |
271 | " 0 560 150 400 150 0 curveto", | |
272 | " 150 -400 100 -900 -1000 -1620 curveto fill", | |
273 | "", | |
274 | " %circle at the left", | |
275 | " newpath", | |
276 | " -700 0 250 0 360 arc fill", | |
277 | "", | |
278 | " %do the two dots after the main curve", | |
279 | " 700 -300 100 0 360 arc fill", | |
280 | " 700 300 100 0 360 arc fill", | |
281 | " } def", | |
282 | "", | |
283 | " % cclef", | |
284 | " /C {", | |
285 | " gsave", | |
286 | " %do upper curved part, then scale to do mirror image", | |
287 | " 0 1 1 {", | |
288 | " pop %we don't need the loop variable", | |
289 | " %outer boundary of curve", | |
290 | " -170 0 moveto 100 300 lineto", | |
291 | " 400 -200 750 300 750 650 curveto", | |
292 | " 750 1100 450 1235 250 1235 curveto", | |
293 | " 0 1235 -143 1100 -143 950 curveto", | |
294 | "", | |
295 | " %inner boundary of curve", | |
296 | " 0 950 lineto", | |
297 | " 0 1100 30 1165 250 1165 curveto", | |
298 | " 300 1165 450 1100 450 650 curveto", | |
299 | " 450 400 400 -100 100 400 curveto", | |
300 | " -270 0 lineto fill", | |
301 | " %stroke", | |
302 | " %-270 0 moveto 100 400 lineto", | |
303 | " %400 -100 450 400 450 650 curveto", | |
304 | " %450 1100 300 1165 250 1165 curveto", | |
305 | " %30 1165 0 1100 0 950 curveto", | |
306 | " %stroke", | |
307 | "", | |
308 | " %elliptical ball at end of curve", | |
309 | " gsave", | |
310 | " 1.3 1 scale", | |
311 | " 10 950 120 0 360 arc fill", | |
312 | " grestore", | |
313 | " 1 -1 scale %reflect across X axis", | |
314 | " } for", | |
315 | " grestore", | |
316 | "", | |
317 | " % two vertical lines on the left", | |
318 | " 300 setlinewidth -600 -1200 halflwid sub moveto", | |
319 | " -600 1200 halflwid add lineto stroke", | |
320 | " lwid setlinewidth -300 -1200 halflwid sub moveto", | |
321 | " -300 1200 halflwid add lineto stroke", | |
322 | " } def", | |
323 | "", | |
324 | " % dblwhole", | |
325 | " /D {", | |
326 | " do_1n %do a whole note", | |
327 | " lwid setlinewidth", | |
328 | " -490 -600 moveto -490 600 lineto stroke", | |
329 | " 490 -600 moveto 490 600 lineto stroke", | |
330 | " } def", | |
331 | "", | |
332 | " % 1n", | |
333 | " /E {", | |
334 | " do_1n %do a whole note", | |
335 | " } def", | |
336 | "", | |
337 | " % 2n", | |
338 | " /F {", | |
339 | " do_2n %do a half note", | |
340 | " } def", | |
341 | "", | |
342 | " % 4n", | |
343 | " /G {", | |
344 | " do_4n %do a quarter note head", | |
345 | " } def", | |
346 | "", | |
347 | " % upflag", | |
348 | " /H {", | |
349 | " do_upflag %do an upflag", | |
350 | " } def", | |
351 | "", | |
352 | " % dnflag", | |
353 | " /I {", | |
354 | " gsave", | |
355 | " 1 -1 scale %reflect across X axis", | |
356 | " do_upflag %do an upflag", | |
357 | " grestore", | |
358 | " } def", | |
359 | "", | |
360 | " % dwhrest", | |
361 | " /J {", | |
362 | " 300 setlinewidth", | |
363 | " 0 0 moveto 0 600 lineto stroke", | |
364 | " } def", | |
365 | "", | |
366 | " % 1rest", | |
367 | " /K {", | |
368 | " lwid setlinewidth", | |
369 | " -750 600 moveto 750 600 lineto stroke", | |
370 | " 300 setlinewidth", | |
371 | " -400 450 moveto 400 450 lineto stroke", | |
372 | " } def", | |
373 | "", | |
374 | " % 2rest", | |
375 | " /L {", | |
376 | " lwid setlinewidth", | |
377 | " -750 0 moveto 750 0 lineto stroke", | |
378 | " 300 setlinewidth", | |
379 | " -400 150 moveto 400 150 lineto stroke", | |
380 | " } def", | |
381 | "", | |
382 | " % 4rest", | |
383 | " /M {", | |
384 | " newpath", | |
385 | " cor3x cor3y halflwid add moveto", | |
386 | " %-400 -200 -450 -650 50 -950 lwid add curveto", | |
387 | " -450 -50 -450 -650 50 -950 lwid add curveto", | |
388 | " -150 -650 -100 -250 cor3x cor3y halflwid sub curveto", | |
389 | " fill", | |
390 | "", | |
391 | " cor1x cor1y moveto cor1x 200 sub cor1y 200 add lineto", | |
392 | " cor2x cor2y lineto cor2x 200 add cor2y 200 sub lineto", | |
393 | " fill", | |
394 | "", | |
395 | " lwid setlinewidth", | |
396 | " topx topy moveto cor1x cor1y lineto stroke", | |
397 | " cor2x cor2y moveto cor3x cor3y lineto stroke", | |
398 | " } def", | |
399 | "", | |
400 | " % 8rest", | |
401 | " /N {", | |
402 | " 0 0 0 -600 do_shortrest", | |
403 | " } def", | |
404 | "", | |
405 | " % 16rest", | |
406 | " /O {", | |
407 | " 1 1 100 -1200 do_shortrest", | |
408 | " } def", | |
409 | "", | |
410 | " % 32rest", | |
411 | " /P {", | |
412 | " 2 1 0 -1800 do_shortrest", | |
413 | " } def", | |
414 | "", | |
415 | " % 64rest", | |
416 | " /Q {", | |
417 | " 3 2 -80 -2100 do_shortrest", | |
418 | " } def", | |
419 | "", | |
420 | " % 128rest", | |
421 | " /R {", | |
422 | " 4 2 -150 -2700 do_shortrest", | |
423 | " } def", | |
424 | "", | |
425 | " % 256rest", | |
426 | " /S {", | |
427 | " 5 3 -280 -3300 do_shortrest", | |
428 | " } def", | |
429 | "", | |
430 | " % dot", | |
431 | " /T {", | |
432 | " newpath", | |
433 | " 0 0 120 0 360 arc fill", | |
434 | " } def", | |
435 | "", | |
436 | " % nat", | |
437 | " /U {", | |
438 | " % fill crossbars so that we can do parallelograms", | |
439 | " -235 -470 moveto -235 -270 lineto", | |
440 | " 235 -130 lineto 235 -330 lineto fill", | |
441 | " -235 130 moveto -235 330 lineto", | |
442 | " 235 470 lineto 235 270 lineto fill", | |
443 | "", | |
444 | " % vertical strokes", | |
445 | " lwid setlinewidth", | |
446 | " -200 -380 moveto -200 850 lineto stroke", | |
447 | " 200 -850 moveto 200 380 lineto stroke", | |
448 | " } def", | |
449 | "", | |
450 | " % sharp", | |
451 | " /V {", | |
452 | " % fill crossbars so that we can do parallelograms", | |
453 | " -325 -480 moveto -325 -280 lineto", | |
454 | " 325 -120 lineto 325 -320 lineto fill", | |
455 | " -325 120 moveto -325 320 lineto", | |
456 | " 325 480 lineto 325 280 lineto fill", | |
457 | "", | |
458 | " % vertical strokes", | |
459 | " lwid setlinewidth", | |
460 | " -150 -930 moveto -150 880 lineto stroke", | |
461 | " 150 -880 moveto 150 930 lineto stroke", | |
462 | " } def", | |
463 | "", | |
464 | " % flat", | |
465 | " /W {", | |
466 | " do_flat %do a flat", | |
467 | " } def", | |
468 | "", | |
469 | " % dblsharp", | |
470 | " /X {", | |
471 | " gsave", | |
472 | " 0 1 3 { %loop once for each of 4 sticks", | |
473 | " pop %we don't need the loop variable", | |
474 | " 0 off neg moveto", | |
475 | " outbendbig outbendsmall lineto", | |
476 | " inbendbig inbendsmall lineto", | |
477 | " limit limit lineto", | |
478 | " inbendsmall inbendbig lineto", | |
479 | " outbendsmall outbendbig lineto", | |
480 | " off neg 0 lineto", | |
481 | " fill", | |
482 | " -90 rotate", | |
483 | " } for", | |
484 | " grestore", | |
485 | " } def", | |
486 | "", | |
487 | " % dblflat", | |
488 | " /Y {", | |
489 | " -290 580 290 { %loop once for each flat", | |
490 | "", | |
491 | " gsave", | |
492 | " 1 setlinewidth", | |
493 | " 0 translate %translate left/right (loop var)", | |
494 | " do_flat %do a flat", | |
495 | " grestore", | |
496 | "", | |
497 | " } for", | |
498 | " } def", | |
499 | "", | |
500 | " % xnote", | |
501 | " /Z {", | |
502 | " gsave", | |
503 | " 1.15 1 scale 120 setlinewidth 1 setlinecap %round", | |
504 | " -300 -300 moveto 300 300 lineto stroke", | |
505 | " -300 300 moveto 300 -300 lineto stroke", | |
506 | " grestore", | |
507 | " } def", | |
508 | "", | |
509 | " % dwhdiamond", | |
510 | " /a {", | |
511 | " do_diamond %do a diamond", | |
512 | " lwid setlinewidth", | |
513 | " -420 -600 moveto -420 600 lineto stroke", | |
514 | " 420 -600 moveto 420 600 lineto stroke", | |
515 | " } def", | |
516 | "", | |
517 | " % diamond", | |
518 | " /b {", | |
519 | " do_diamond %do a diamond", | |
520 | " } def", | |
521 | "", | |
522 | " % filldiamond", | |
523 | " /c {", | |
524 | " 420 0 moveto 0 300 lineto", | |
525 | " -420 0 lineto 0 -300 lineto fill", | |
526 | " } def", | |
527 | "", | |
528 | " % up2n", | |
529 | " /d {", | |
530 | " lwid setlinewidth", | |
531 | " 380 0 moveto 380 2100 lineto stroke", | |
532 | " do_2n %do a half note", | |
533 | " } def", | |
534 | "", | |
535 | " % dn2n", | |
536 | " /e {", | |
537 | " lwid setlinewidth", | |
538 | " -380 0 moveto -380 -2100 lineto stroke", | |
539 | " do_2n %do a half note", | |
540 | " } def", | |
541 | "", | |
542 | " % up4n", | |
543 | " /f {", | |
544 | " do_4n %do a quarter note head", | |
545 | " lwid setlinewidth", | |
546 | " 370 0 moveto 370 2100 lineto stroke", | |
547 | " } def", | |
548 | "", | |
549 | " % dn4n", | |
550 | " /g {", | |
551 | " do_4n %do a quarter note head", | |
552 | " lwid setlinewidth", | |
553 | " -370 0 moveto -370 -2100 lineto stroke", | |
554 | " } def", | |
555 | "", | |
556 | " % up8n", | |
557 | " /h {", | |
558 | " gsave", | |
559 | " -330 0 translate % half a flag width", | |
560 | " do_4n %do a quarter note head", | |
561 | " lwid setlinewidth", | |
562 | " 370 0 moveto 370 2100 lineto stroke", | |
563 | " 670 2100 translate", | |
564 | " 1 -1 scale %reflect across X axis", | |
565 | " do_upflag %do an upflag", | |
566 | " grestore", | |
567 | " } def", | |
568 | "", | |
569 | " % dn8n", | |
570 | " /i {", | |
571 | " do_4n %do a quarter note head", | |
572 | " lwid setlinewidth", | |
573 | " -370 0 moveto -370 -2100 lineto stroke", | |
574 | " gsave", | |
575 | " -70 -2100 translate", | |
576 | " do_upflag %do an upflag", | |
577 | " grestore", | |
578 | " } def", | |
579 | "", | |
580 | " % up16n", | |
581 | " /j {", | |
582 | " 2 do_upshortnote", | |
583 | " } def", | |
584 | "", | |
585 | " % dn16n", | |
586 | " /k {", | |
587 | " 2 do_dnshortnote", | |
588 | " } def", | |
589 | "", | |
590 | " % up32n", | |
591 | " /l {", | |
592 | " 3 do_upshortnote", | |
593 | " } def", | |
594 | "", | |
595 | " % dn32n", | |
596 | " /m {", | |
597 | " 3 do_dnshortnote", | |
598 | " } def", | |
599 | "", | |
600 | " % up64n", | |
601 | " /n {", | |
602 | " 4 do_upshortnote", | |
603 | " } def", | |
604 | "", | |
605 | " % dn64n", | |
606 | " /o {", | |
607 | " 4 do_dnshortnote", | |
608 | " } def", | |
609 | "", | |
610 | " % up128n", | |
611 | " /p {", | |
612 | " 5 do_upshortnote", | |
613 | " } def", | |
614 | "", | |
615 | " % dn128n", | |
616 | " /q {", | |
617 | " 5 do_dnshortnote", | |
618 | " } def", | |
619 | "", | |
620 | " % up256n", | |
621 | " /r {", | |
622 | " 6 do_upshortnote", | |
623 | " } def", | |
624 | "", | |
625 | " % dn256n", | |
626 | " /s {", | |
627 | " 6 do_dnshortnote", | |
628 | " } def", | |
629 | "", | |
630 | " % com", | |
631 | " /t {", | |
632 | " do_com %do a common time symbol", | |
633 | " } def", | |
634 | "", | |
635 | " % cut", | |
636 | " /u {", | |
637 | " do_com %do a common time symbol", | |
638 | " lwid setlinewidth", | |
639 | " 0 -900 moveto 0 900 lineto stroke", | |
640 | " } def", | |
641 | "", | |
642 | " % begped", | |
643 | " /v {", | |
644 | " lwid setlinewidth", | |
645 | " -200 600 moveto -200 0 lineto 200 0 lineto stroke", | |
646 | " } def", | |
647 | "", | |
648 | " % pedal", | |
649 | " /w {", | |
650 | " lwid setlinewidth", | |
651 | " -500 0 moveto -450 0 lineto 0 600 lineto", | |
652 | " 450 0 lineto 500 0 lineto stroke", | |
653 | " } def", | |
654 | "", | |
655 | " % endped", | |
656 | " /x {", | |
657 | " lwid setlinewidth", | |
658 | " 200 600 moveto 200 0 lineto -200 0 lineto stroke", | |
659 | " } def", | |
660 | "", | |
661 | " % dnbow", | |
662 | " /y {", | |
663 | " lwid setlinewidth", | |
664 | " -350 0 moveto -350 900 lineto stroke", | |
665 | " 350 0 moveto 350 900 lineto stroke", | |
666 | " 200 setlinewidth", | |
667 | " -350 800 moveto 350 800 lineto stroke", | |
668 | " } def", | |
669 | "", | |
670 | " % upbow", | |
671 | " /z {", | |
672 | " lwid setlinewidth", | |
673 | " -300 900 moveto 0 0 lineto 300 900 lineto stroke", | |
674 | " } def", | |
675 | "", | |
676 | " % wedge", | |
677 | " /one {", | |
678 | " 0 0 moveto -150 500 lineto 150 500 lineto fill", | |
679 | " } def", | |
680 | "", | |
681 | " % uwedge", | |
682 | " /two {", | |
683 | " -150 0 moveto 150 0 lineto 0 500 lineto fill", | |
684 | " } def", | |
685 | "", | |
686 | " % ferm", | |
687 | " /three {", | |
688 | " newpath", | |
689 | " do_ferm %do a right side up fermata", | |
690 | " } def", | |
691 | "", | |
692 | " % uferm", | |
693 | " /four {", | |
694 | " newpath", | |
695 | " gsave", | |
696 | " 0 270 lwid sub 800 add translate %baseline at bottom", | |
697 | " 180 rotate %upside down", | |
698 | " do_ferm %do a right side up fermata", | |
699 | " grestore", | |
700 | " } def", | |
701 | "", | |
702 | " % sign", | |
703 | " /five {", | |
704 | " gsave", | |
705 | " %do upper left curved part, upper right dot;", | |
706 | " %then rotate 180 to do other half", | |
707 | " 0 1 1 {", | |
708 | " pop %we don't need the loop variable", | |
709 | " 0 100 moveto %inner boundary", | |
710 | " -1000 300 -400 750 -200 700 curveto", | |
711 | " -200 800 lineto %outer boundary", | |
712 | " -550 900 -1100 100 0 -100 curveto", | |
713 | " fill", | |
714 | " %dot at end of curve", | |
715 | " -200 700 100 0 360 arc fill", | |
716 | " %dot in upper right quadrant", | |
717 | " 500 200 70 0 360 arc fill", | |
718 | " 180 rotate", | |
719 | " } for", | |
720 | " grestore", | |
721 | "", | |
722 | " %slash through middle", | |
723 | " lwid setlinewidth", | |
724 | " -400 -800 moveto 400 800 lineto stroke", | |
725 | " } def", | |
726 | "", | |
727 | " % coda", | |
728 | " /six {", | |
729 | " newpath", | |
730 | " gsave", | |
731 | " 0.6 1 scale", | |
732 | " 0 0 550 0 360 arc %outside boundary", | |
733 | " 1 0.6 div 1 scale %back to original", | |
734 | " 0.9 1 scale", | |
735 | " 0 0 650 0 360 arc %inside boundary", | |
736 | " eofill", | |
737 | " grestore", | |
738 | " lwid setlinewidth", | |
739 | " 0 -850 moveto 0 850 lineto stroke", | |
740 | " -800 0 moveto 800 0 lineto stroke", | |
741 | " } def", | |
742 | "", | |
743 | " % mor", | |
744 | " /seven {", | |
745 | " do_mor %do a mordent", | |
746 | " } def", | |
747 | "", | |
748 | " % invmor", | |
749 | " /eight {", | |
750 | " do_mor %do a mordent", | |
751 | " lwid setlinewidth", | |
752 | " 0 -450 moveto 0 450 lineto stroke", | |
753 | " } def", | |
754 | "", | |
755 | " % turn", | |
756 | " /nine {", | |
757 | " do_turn %do a turn", | |
758 | " } def", | |
759 | "", | |
760 | " % invturn", | |
761 | " /zero {", | |
762 | " gsave", | |
763 | " 1 -1 scale %reflect across X axis", | |
764 | " do_turn %do a turn", | |
765 | " grestore", | |
766 | " } def", | |
767 | "", | |
768 | " % acc_gt", | |
769 | " /numbersign {", | |
770 | " lwid setlinewidth", | |
771 | " -500 300 moveto 500 0 lineto -500 -300 lineto stroke", | |
772 | " } def", | |
773 | "", | |
774 | " % acc_hat", | |
775 | " /dollar {", | |
776 | " newpath", | |
777 | " -365 0 moveto 0 860 lineto 365 0 lineto", | |
778 | " 150 0 lineto -75 530 lineto -300 0 lineto fill", | |
779 | " } def", | |
780 | "", | |
781 | " % acc_uhat", | |
782 | " /quotedbl {", | |
783 | " newpath", | |
784 | " 365 860 moveto 0 0 lineto -365 860 lineto", | |
785 | " -150 860 lineto 75 330 lineto 300 860 lineto fill", | |
786 | " } def", | |
787 | "", | |
788 | " % tr", | |
789 | " /asterisk {", | |
790 | " %vertical bar of t", | |
791 | " -350 1000 moveto -550 200 lineto", | |
792 | " -612.5 -50 -212.5 -50 -160 200 curveto", | |
793 | " -230 200 lineto", | |
794 | " -300 50 -420 50 -400 200 curveto", | |
795 | " -200 1000 lineto fill", | |
796 | "", | |
797 | " %crossbar of t and vertical bar of r", | |
798 | " -700 600 moveto -160 600 lineto", | |
799 | " 20 600 30 520 60 440 curveto", | |
800 | " -50 0 lineto 70 0 lineto 180 440 lineto", | |
801 | " 190 480 100 670 -150 670 curveto", | |
802 | " -690 670 lineto fill", | |
803 | "", | |
804 | " %horizontal curve of r", | |
805 | " 100 480 moveto", | |
806 | " 300 630 450 700 650 550 curveto", | |
807 | " 560 480 lineto", | |
808 | " 450 630 300 560 100 390 curveto", | |
809 | " fill", | |
810 | "", | |
811 | " %knob at end of r", | |
812 | " 600 460 100 0 360 arc fill", | |
813 | " } def", | |
814 | "", | |
815 | " % leg", | |
816 | " /comma {", | |
817 | " 100 setlinewidth", | |
818 | " -400 0 moveto 400 0 lineto stroke", | |
819 | " } def", | |
820 | "", | |
821 | " % rr", | |
822 | " /hyphen {", | |
823 | " 100 setlinewidth", | |
824 | " -400 0 moveto 0 1000 lineto stroke", | |
825 | " 0 0 moveto 400 1000 lineto stroke", | |
826 | " } def", | |
827 | "", | |
828 | " % measrpt", | |
829 | " /period {", | |
830 | " newpath -450 400 150 0 360 arc fill", | |
831 | " newpath 450 -400 150 0 360 arc fill", | |
832 | " 200 setlinewidth", | |
833 | " -550 -600 moveto 550 600 lineto stroke", | |
834 | " } def", | |
835 | "", | |
836 | " % copyright", | |
837 | " /slash {", | |
838 | " lwid setlinewidth", | |
839 | " newpath 0 400 400 0 360 arc stroke", | |
840 | " newpath 0 400 200 45 315 arc stroke", | |
841 | " } def", | |
842 | "", | |
843 | " % dim", | |
844 | " /quoteleft {", | |
845 | " 50 setlinewidth", | |
846 | " newpath 0 640 220 0 360 arc stroke", | |
847 | " } def", | |
848 | "", | |
849 | " % halfdim", | |
850 | " /quoteright {", | |
851 | " 50 setlinewidth", | |
852 | " newpath 0 640 220 0 360 arc stroke", | |
853 | " newpath -340 300 moveto 340 980 lineto stroke", | |
854 | " } def", | |
855 | "", | |
856 | " % triangle", | |
857 | " /asciicircum {", | |
858 | " 50 setlinewidth", | |
859 | " newpath -340 -10 moveto 0 710 lineto", | |
860 | " 340 -10 lineto closepath stroke", | |
861 | " } def", | |
862 | "", | |
863 | " % qwhrest", | |
864 | " /ampersand {", | |
865 | " 300 setlinewidth", | |
866 | " 0 -600 moveto 0 600 lineto stroke", | |
867 | " } def", | |
868 | "", | |
869 | " % ll1rest", | |
870 | " /exclam {", | |
871 | " 310 setlinewidth", | |
872 | " -400 455 moveto 400 450 lineto stroke", | |
873 | " } def", | |
874 | "", | |
875 | " % ll2rest", | |
876 | " /at {", | |
877 | " 310 setlinewidth", | |
878 | " -400 145 moveto 400 150 lineto stroke", | |
879 | " } def", | |
880 | " end", | |
881 | "", | |
882 | " /BuildChar {", | |
883 | "", | |
884 | " exch begin", | |
885 | " Encoding exch get", | |
886 | "", | |
887 | " dup", | |
888 | " Mcbbox0 exch get", | |
889 | " aload pop setcachedevice", | |
890 | "", | |
891 | " CharStrings exch get", | |
892 | " exec", | |
893 | " end", | |
894 | " } def", | |
895 | "end", | |
896 | "", | |
897 | "", | |
898 | "% Define another music character font, since there are too many to fit in one", | |
899 | "% font. It works the same way as the first one.", | |
900 | "", | |
901 | "/mfont1 100 dict def", | |
902 | "mfont1 begin", | |
903 | " /FontType 3 def", | |
904 | " /FontMatrix [ .001 0 0 0.001 0 0 ] def", | |
905 | " /FontBBox [ -2000 -4030 2000 4030 ] def", | |
906 | " /FontName (Mfont1) def", | |
907 | "", | |
908 | " % set up Encoding vector with standard names", | |
909 | " /Encoding 256 array def", | |
910 | " StandardEncoding Encoding copy", | |
911 | " pop", | |
912 | "", | |
913 | " %%%%% define routines that will be used by multiple characters %%%%%", | |
914 | "", | |
915 | " /do_dwh_bars {", | |
916 | " % the two bars surrounding a double whole note", | |
917 | " lwid setlinewidth", | |
918 | " -420 -600 moveto -420 600 lineto stroke", | |
919 | " 420 -600 moveto 420 600 lineto stroke", | |
920 | " } def", | |
921 | " /do_righttriangle {", | |
922 | " newpath", | |
923 | " 420 270 moveto -420 270 lineto 350 -300 lineto 420 -300 lineto", | |
924 | " 350 150 moveto -140 150 lineto 350 -213 lineto", | |
925 | " eofill", | |
926 | " } def", | |
927 | " /do_fillrighttriangle {", | |
928 | " newpath", | |
929 | " 420 270 moveto -420 270 lineto 350 -300 lineto 420 -300 lineto", | |
930 | " fill", | |
931 | " } def", | |
932 | " /do_rectangle {", | |
933 | " newpath", | |
934 | " 420 270 moveto -420 270 lineto -420 -270 lineto 420 -270 lineto", | |
935 | " 350 150 moveto -350 150 lineto -350 -150 lineto 350 -150 lineto", | |
936 | " eofill", | |
937 | " } def", | |
938 | " /do_isostriangle {", | |
939 | " newpath", | |
940 | " 0 300 moveto -420 -270 lineto 420 -270 lineto", | |
941 | " 0 182 moveto -245 -150 lineto 245 -150 lineto", | |
942 | " eofill", | |
943 | " } def", | |
944 | " /do_piewedge {", | |
945 | " newpath", | |
946 | " 0 -300 moveto 0 -244 514 35 145 arc", | |
947 | " 0 -209 moveto 0 -244 394 43 137 arc", | |
948 | " eofill", | |
949 | " } def", | |
950 | " /do_semicircle {", | |
951 | " newpath", | |
952 | " gsave", | |
953 | " 1 1.357 scale 420 199 moveto 0 199 420 180 360 arc", | |
954 | " 1 1.09 scale 350 111 moveto 0 199 350 194.1 345.9 arc", | |
955 | " eofill", | |
956 | " grestore", | |
957 | " } def", | |
958 | " /do_slashhead {", | |
959 | " newpath", | |
960 | " lwid setlinewidth", | |
961 | " -620 -530 moveto -480 -670 lineto 620 530 lineto 480 670 lineto", | |
962 | " closepath stroke", | |
963 | " } def", | |
964 | "", | |
965 | " % subsidiary dictionary of character definitions", | |
966 | " /CharStrings 128 dict def", | |
967 | " CharStrings begin", | |
968 | "", | |
969 | " /.notdef {} def", | |
970 | "", | |
971 | " % Here are the definitions of the characters. A stepsize here", | |
972 | " % is 300 units (assuming the character is drawn at its default", | |
973 | " % size).", | |
974 | "", | |
975 | " % dwhrighttriangle", | |
976 | " /A {", | |
977 | " do_righttriangle", | |
978 | " do_dwh_bars", | |
979 | " } def", | |
980 | "", | |
981 | " % righttriangle", | |
982 | " /B {", | |
983 | " do_righttriangle", | |
984 | " } def", | |
985 | "", | |
986 | " % fillrighttriangle", | |
987 | " /C {", | |
988 | " newpath", | |
989 | " 420 270 moveto -420 270 lineto 350 -300 lineto", | |
990 | " 420 -300 lineto", | |
991 | " fill", | |
992 | " } def", | |
993 | "", | |
994 | " % udwhrighttriangle", | |
995 | " /D {", | |
996 | " gsave", | |
997 | " 180 rotate", | |
998 | " do_righttriangle", | |
999 | " do_dwh_bars", | |
1000 | " grestore", | |
1001 | " } def", | |
1002 | "", | |
1003 | " % urighttriangle", | |
1004 | " /E {", | |
1005 | " gsave", | |
1006 | " 180 rotate", | |
1007 | " do_righttriangle", | |
1008 | " grestore", | |
1009 | " } def", | |
1010 | "", | |
1011 | " % ufillrighttriangle", | |
1012 | " /F {", | |
1013 | " gsave", | |
1014 | " 180 rotate", | |
1015 | " do_fillrighttriangle", | |
1016 | " grestore", | |
1017 | " } def", | |
1018 | "", | |
1019 | " % dwhrectangle", | |
1020 | " /G {", | |
1021 | " do_rectangle", | |
1022 | " do_dwh_bars", | |
1023 | " } def", | |
1024 | "", | |
1025 | " % rectangle", | |
1026 | " /H {", | |
1027 | " do_rectangle", | |
1028 | " } def", | |
1029 | "", | |
1030 | " % fillrectangle", | |
1031 | " /I {", | |
1032 | " newpath", | |
1033 | " 420 270 moveto -420 270 lineto -420 -270 lineto", | |
1034 | " 420 -270 lineto", | |
1035 | " fill", | |
1036 | " } def", | |
1037 | "", | |
1038 | " % dwhisostriangle", | |
1039 | " /J {", | |
1040 | " do_isostriangle", | |
1041 | " do_dwh_bars", | |
1042 | " } def", | |
1043 | "", | |
1044 | " % isostriangle", | |
1045 | " /K {", | |
1046 | " do_isostriangle", | |
1047 | " } def", | |
1048 | "", | |
1049 | " % fillisostriangle", | |
1050 | " /L {", | |
1051 | " newpath", | |
1052 | " 0 300 moveto -420 -270 lineto 420 -270 lineto", | |
1053 | " fill", | |
1054 | " } def", | |
1055 | "", | |
1056 | " % dwhpiewedge", | |
1057 | " /M {", | |
1058 | " do_piewedge", | |
1059 | " do_dwh_bars", | |
1060 | " } def", | |
1061 | "", | |
1062 | " % piewedge", | |
1063 | " /N {", | |
1064 | " do_piewedge", | |
1065 | " } def", | |
1066 | "", | |
1067 | " % fillpiewedge", | |
1068 | " /O {", | |
1069 | " newpath", | |
1070 | " 0 -300 moveto 0 -244 514 35 145 arc", | |
1071 | " fill", | |
1072 | " } def", | |
1073 | "", | |
1074 | " % dwhsemicircle", | |
1075 | " /P {", | |
1076 | " do_semicircle", | |
1077 | " do_dwh_bars", | |
1078 | " } def", | |
1079 | "", | |
1080 | " % semicircle", | |
1081 | " /Q {", | |
1082 | " do_semicircle", | |
1083 | " } def", | |
1084 | "", | |
1085 | " % fillsemicircle", | |
1086 | " /R {", | |
1087 | " newpath", | |
1088 | " gsave", | |
1089 | " 1 570 420 div scale", | |
1090 | " 420 199 moveto 0 199 420 180 360 arc", | |
1091 | " fill", | |
1092 | " grestore", | |
1093 | " } def", | |
1094 | "", | |
1095 | " % dwhslashhead", | |
1096 | " /S {", | |
1097 | " do_slashhead", | |
1098 | " lwid setlinewidth", | |
1099 | " -650 -600 moveto -650 600 lineto stroke", | |
1100 | " 650 -600 moveto 650 600 lineto stroke", | |
1101 | " } def", | |
1102 | "", | |
1103 | " % slashhead", | |
1104 | " /T {", | |
1105 | " do_slashhead", | |
1106 | " } def", | |
1107 | "", | |
1108 | " % fillslashhead", | |
1109 | " /U {", | |
1110 | " newpath", | |
1111 | " 200 setlinewidth", | |
1112 | " -550 -600 moveto 550 600 lineto stroke", | |
1113 | " } def", | |
1114 | "", | |
1115 | " % blankhead", | |
1116 | " /V {", | |
1117 | " %print nothing", | |
1118 | " } def", | |
1119 | " end", | |
1120 | "", | |
1121 | " /BuildChar {", | |
1122 | "", | |
1123 | " exch begin", | |
1124 | " Encoding exch get", | |
1125 | "", | |
1126 | " dup", | |
1127 | " Mcbbox1 exch get", | |
1128 | " aload pop setcachedevice", | |
1129 | "", | |
1130 | " CharStrings exch get", | |
1131 | " exec", | |
1132 | " end", | |
1133 | " } def", | |
1134 | "end", | |
1135 | "", | |
1136 | "", | |
1137 | "% General routines for printing any music character, invoked by each music", | |
1138 | "% character's specific routine below. The scaling factor (default 1) needs", | |
1139 | "% to be multiplied by 10 to get the actual size. These routines restore the", | |
1140 | "% preexisting current font when they are done.", | |
1141 | "", | |
1142 | "/printmchar0 {", | |
1143 | " gsave", | |
1144 | " /musicchar exch def", | |
1145 | " /Mfont0 findfont exch 10 mul scalefont setfont moveto ", | |
1146 | " musicchar show", | |
1147 | " grestore", | |
1148 | "} def", | |
1149 | "/printmchar1 {", | |
1150 | " gsave", | |
1151 | " /musicchar exch def", | |
1152 | " /Mfont1 findfont exch 10 mul scalefont setfont moveto ", | |
1153 | " musicchar show", | |
1154 | " grestore", | |
1155 | "} def", | |
1156 | "", | |
1157 | "% Define each music character name to be a routine that prints the character.", | |
1158 | "% Each character is to be invoked as in this example:", | |
1159 | "% 100 200 1 gclef % at (100, 200), scale to default size & print", | |
1160 | "", | |
1161 | "/gclef { (A) printmchar0 } def", | |
1162 | "/fclef { (B) printmchar0 } def", | |
1163 | "/cclef { (C) printmchar0 } def", | |
1164 | "/dblwhole { (D) printmchar0 } def", | |
1165 | "/1n { (E) printmchar0 } def", | |
1166 | "/2n { (F) printmchar0 } def", | |
1167 | "/4n { (G) printmchar0 } def", | |
1168 | "/upflag { (H) printmchar0 } def", | |
1169 | "/dnflag { (I) printmchar0 } def", | |
1170 | "/dwhrest { (J) printmchar0 } def", | |
1171 | "/1rest { (K) printmchar0 } def", | |
1172 | "/2rest { (L) printmchar0 } def", | |
1173 | "/4rest { (M) printmchar0 } def", | |
1174 | "/8rest { (N) printmchar0 } def", | |
1175 | "/16rest { (O) printmchar0 } def", | |
1176 | "/32rest { (P) printmchar0 } def", | |
1177 | "/64rest { (Q) printmchar0 } def", | |
1178 | "/128rest { (R) printmchar0 } def", | |
1179 | "/256rest { (S) printmchar0 } def", | |
1180 | "/dot { (T) printmchar0 } def", | |
1181 | "/nat { (U) printmchar0 } def", | |
1182 | "/sharp { (V) printmchar0 } def", | |
1183 | "/flat { (W) printmchar0 } def", | |
1184 | "/dblsharp { (X) printmchar0 } def", | |
1185 | "/dblflat { (Y) printmchar0 } def", | |
1186 | "/xnote { (Z) printmchar0 } def", | |
1187 | "/dwhdiamond { (a) printmchar0 } def", | |
1188 | "/diamond { (b) printmchar0 } def", | |
1189 | "/filldiamond { (c) printmchar0 } def", | |
1190 | "/up2n { (d) printmchar0 } def", | |
1191 | "/dn2n { (e) printmchar0 } def", | |
1192 | "/up4n { (f) printmchar0 } def", | |
1193 | "/dn4n { (g) printmchar0 } def", | |
1194 | "/up8n { (h) printmchar0 } def", | |
1195 | "/dn8n { (i) printmchar0 } def", | |
1196 | "/up16n { (j) printmchar0 } def", | |
1197 | "/dn16n { (k) printmchar0 } def", | |
1198 | "/up32n { (l) printmchar0 } def", | |
1199 | "/dn32n { (m) printmchar0 } def", | |
1200 | "/up64n { (n) printmchar0 } def", | |
1201 | "/dn64n { (o) printmchar0 } def", | |
1202 | "/up128n { (p) printmchar0 } def", | |
1203 | "/dn128n { (q) printmchar0 } def", | |
1204 | "/up256n { (r) printmchar0 } def", | |
1205 | "/dn256n { (s) printmchar0 } def", | |
1206 | "/com { (t) printmchar0 } def", | |
1207 | "/cut { (u) printmchar0 } def", | |
1208 | "/begped { (v) printmchar0 } def", | |
1209 | "/pedal { (w) printmchar0 } def", | |
1210 | "/endped { (x) printmchar0 } def", | |
1211 | "/dnbow { (y) printmchar0 } def", | |
1212 | "/upbow { (z) printmchar0 } def", | |
1213 | "/wedge { (1) printmchar0 } def", | |
1214 | "/uwedge { (2) printmchar0 } def", | |
1215 | "/ferm { (3) printmchar0 } def", | |
1216 | "/uferm { (4) printmchar0 } def", | |
1217 | "/sign { (5) printmchar0 } def", | |
1218 | "/coda { (6) printmchar0 } def", | |
1219 | "/mor { (7) printmchar0 } def", | |
1220 | "/invmor { (8) printmchar0 } def", | |
1221 | "/turn { (9) printmchar0 } def", | |
1222 | "/invturn { (0) printmchar0 } def", | |
1223 | "/acc_gt { (#) printmchar0 } def", | |
1224 | "/acc_hat { ($) printmchar0 } def", | |
1225 | "/acc_uhat { (\") printmchar0 } def", | |
1226 | "/tr { (*) printmchar0 } def", | |
1227 | "/leg { (,) printmchar0 } def", | |
1228 | "/rr { (-) printmchar0 } def", | |
1229 | "/measrpt { (.) printmchar0 } def", | |
1230 | "/copyright { (/) printmchar0 } def", | |
1231 | "/dim { (`) printmchar0 } def", | |
1232 | "/halfdim { (') printmchar0 } def", | |
1233 | "/triangle { (^) printmchar0 } def", | |
1234 | "/qwhrest { (&) printmchar0 } def", | |
1235 | "/ll1rest { (!) printmchar0 } def", | |
1236 | "/ll2rest { (@) printmchar0 } def", | |
1237 | "/dwhrighttriangle { (A) printmchar1 } def", | |
1238 | "/righttriangle { (B) printmchar1 } def", | |
1239 | "/fillrighttriangle { (C) printmchar1 } def", | |
1240 | "/udwhrighttriangle { (D) printmchar1 } def", | |
1241 | "/urighttriangle { (E) printmchar1 } def", | |
1242 | "/ufillrighttriangle { (F) printmchar1 } def", | |
1243 | "/dwhrectangle { (G) printmchar1 } def", | |
1244 | "/rectangle { (H) printmchar1 } def", | |
1245 | "/fillrectangle { (I) printmchar1 } def", | |
1246 | "/dwhisostriangle { (J) printmchar1 } def", | |
1247 | "/isostriangle { (K) printmchar1 } def", | |
1248 | "/fillisostriangle { (L) printmchar1 } def", | |
1249 | "/dwhpiewedge { (M) printmchar1 } def", | |
1250 | "/piewedge { (N) printmchar1 } def", | |
1251 | "/fillpiewedge { (O) printmchar1 } def", | |
1252 | "/dwhsemicircle { (P) printmchar1 } def", | |
1253 | "/semicircle { (Q) printmchar1 } def", | |
1254 | "/fillsemicircle { (R) printmchar1 } def", | |
1255 | "/dwhslashhead { (S) printmchar1 } def", | |
1256 | "/slashhead { (T) printmchar1 } def", | |
1257 | "/fillslashhead { (U) printmchar1 } def", | |
1258 | "/blankhead { (V) printmchar1 } def", | |
1259 | "", | |
1260 | "", | |
1261 | "% Define routines for Mup output other than music characters.", | |
1262 | "", | |
1263 | "/stepsize 3 def % define a step size as 3 points (at default magnification)", | |
1264 | "", | |
1265 | "% x1 y1 x2 lines dist staffscale staff", | |
1266 | "% draw a staff starting at x1, y1 and extending to x2 with \"lines\"", | |
1267 | "% lines, 2*dist*stepsize apart, scaled by staffscale", | |
1268 | "/staff {", | |
1269 | " /staffscale exch def", | |
1270 | " /dist exch def", | |
1271 | " /lines exch def", | |
1272 | " /x2 exch def", | |
1273 | " /y1 exch def", | |
1274 | " /x1 exch def", | |
1275 | " 0.7 staffscale mul sb setlinewidth", | |
1276 | " 1 lines sub 2 lines 1 sub { % loop from bottom line to top line", | |
1277 | " dup stepsize mul staffscale mul dist mul y1 add x1 exch moveto", | |
1278 | " stepsize mul staffscale mul dist mul y1 add x2 exch lineto stroke", | |
1279 | " } for", | |
1280 | "} def", | |
1281 | "", | |
1282 | "% x y1 y2 bracket draw a bracket; y1 is the top", | |
1283 | "/bracket {", | |
1284 | " /y2 exch def", | |
1285 | " /y1 exch def", | |
1286 | " /x exch def", | |
1287 | " gsave", | |
1288 | " 3 setlinewidth", | |
1289 | " x 2 sub y1 1 add moveto", | |
1290 | " x 2 sub y2 1 sub lineto", | |
1291 | " stroke", | |
1292 | " x 2 sub y1 1 add moveto", | |
1293 | " x 1 sub y1 1 add x 3 add y1 1 add x 5 add y1 6 add curveto", | |
1294 | " x 6 add y1 5 add lineto", | |
1295 | " x 5 add y1 2 add x 1 add y1 2 sub x 2 sub y1 2 sub curveto", | |
1296 | " fill", | |
1297 | " x 2 sub y2 1 sub moveto", | |
1298 | " x 1 sub y2 1 sub x 3 add y2 1 sub x 5 add y2 6 sub curveto", | |
1299 | " x 6 add y2 5 sub lineto", | |
1300 | " x 5 add y2 2 sub x 1 add y2 2 add x 2 sub y2 2 add curveto", | |
1301 | " fill", | |
1302 | " grestore", | |
1303 | "} def", | |
1304 | "", | |
1305 | "% x y1 y2 brace draw a brace; y1 is the top", | |
1306 | "/brace {", | |
1307 | " /y2 exch def", | |
1308 | " /y1 exch def", | |
1309 | " /x exch def", | |
1310 | " gsave", | |
1311 | " x 9 sub y1 y2 add 2 div translate", | |
1312 | " /topy y1 y2 sub 2 div 1 sub def", | |
1313 | " 0 1 1 {", | |
1314 | " pop", | |
1315 | " %0 topy moveto 0 0 lineto stroke", | |
1316 | " 0 0 moveto", | |
1317 | " 16 topy 0.2 mul -11 topy 0.6 mul 8 topy curveto", | |
1318 | " 8.7 topy lineto", | |
1319 | " -7 topy 0.7 mul 20 topy 0.3 mul 1 0 curveto", | |
1320 | " fill", | |
1321 | " 1 -1 scale % flip to do bottom half", | |
1322 | " } for", | |
1323 | " grestore", | |
1324 | "} def", | |
1325 | "", | |
1326 | "% endx endy wavy staffscale draw a wavy line from current point to here,", | |
1327 | "% scaled by staffscale", | |
1328 | "/wavy {", | |
1329 | " /staffscale exch def", | |
1330 | " /endy exch def % define the end point of the line", | |
1331 | " /endx exch def", | |
1332 | " currentpoint % line starts at current point", | |
1333 | " /begy exch def % define the beginning point of the line", | |
1334 | " /begx exch def", | |
1335 | " gsave", | |
1336 | " /dx endx begx sub def % find delta x and delta y", | |
1337 | " /dy endy begy sub def", | |
1338 | " /r dx dx mul dy dy mul add sqrt def % hypotenuse", | |
1339 | " /theta dy dx atan def % angle with positive x axis", | |
1340 | " begx begy translate % change axes so that we can draw the line", | |
1341 | " theta rotate % from (0, 0) to (r, 0)", | |
1342 | " staffscale staffscale scale % scale everything by staffscale", | |
1343 | " /scaledr r staffscale div def % but scale r in reverse to keep length", | |
1344 | "", | |
1345 | " % Each outer loop draws one cycle of the squiggle. It continues until", | |
1346 | " % we are at or beyond the desired end point.", | |
1347 | " 0 0 moveto", | |
1348 | " 0 6 scaledr {", | |
1349 | " gsave", | |
1350 | " % first loop draws left half of squiggle; second draws right", | |
1351 | " 0 1 1 {", | |
1352 | " 0.0 0.4 moveto", | |
1353 | " 2.0 1.9 3.4 2.3 3.9 0.0 curveto", | |
1354 | " 2.1 0.0 lineto", | |
1355 | " 1.9 0.8 1.4 0.7 0.0 -0.4 curveto", | |
1356 | " fill", | |
1357 | " pop 180 rotate -6 0 translate", | |
1358 | " } for", | |
1359 | " grestore", | |
1360 | "", | |
1361 | " pop 6 0 translate % shift axes right one squiggle", | |
1362 | " } for", | |
1363 | "", | |
1364 | " grestore", | |
1365 | "} def", | |
1366 | "", | |
1367 | "% x y space frets fretno numvert curvel curver [ f1 f2 f3 ... ] grid", | |
1368 | "% print a guitar grid diagram", | |
1369 | "/grid {", | |
1370 | " /grid_positions exch def % 0=\"o\", -1=\"x\", -2=nothing, positive=dot", | |
1371 | " /curver exch def % right string for curve, 0 if none", | |
1372 | " /curvel exch def % left string for curve, 0 if none", | |
1373 | " /numvert exch def % vertical position to print fretno, 0 if none", | |
1374 | " /fretno exch def % fret no. to print at right, 0 if none", | |
1375 | " /frets exch def % number of fret lines", | |
1376 | " /space exch def % points between two neighboring lines", | |
1377 | " /y exch def % y coord of top fret line", | |
1378 | " /x exch def % x coord of left strings", | |
1379 | "", | |
1380 | " gsave", | |
1381 | " /strings grid_positions length def % number of strings", | |
1382 | " /lmarky 0.4 space mul y add def % lowest Y of a \"o\" or \"x\"", | |
1383 | " space 10 div setlinewidth", | |
1384 | " 2 setlinecap", | |
1385 | "", | |
1386 | " % draw the lines of the grid", | |
1387 | " 0 1 strings 1 sub { % loop from left string to right string", | |
1388 | " dup space mul x add y moveto", | |
1389 | " space mul x add frets 1 sub space mul y exch sub lineto stroke", | |
1390 | " } for", | |
1391 | " 0 -1 1 frets sub { % loop from top fret (nut) to bottom fret", | |
1392 | " dup space mul y add x exch moveto", | |
1393 | " space mul y add strings 1 sub space mul x add exch lineto stroke", | |
1394 | " } for", | |
1395 | "", | |
1396 | " % draw the curved line if there is one", | |
1397 | " curvel 0 gt {", | |
1398 | " % within strings curvel to curver, find smallest positive fret", | |
1399 | " /minfret 1000 def", | |
1400 | " curvel 1 curver {", | |
1401 | " /strno exch def", | |
1402 | " /grid_p grid_positions strno 1 sub get def", | |
1403 | " grid_p 0 gt grid_p minfret lt and {", | |
1404 | " /minfret grid_p def", | |
1405 | " } if", | |
1406 | " } for", | |
1407 | "", | |
1408 | " % if curve goes above top fret, other marks must be higher", | |
1409 | " minfret 1 eq {", | |
1410 | " /hmarky 1.2 space mul y add def", | |
1411 | " } {", | |
1412 | " /hmarky lmarky def", | |
1413 | " } ifelse", | |
1414 | "", | |
1415 | " /strdiff curver curvel sub def", | |
1416 | " space 8 div setlinewidth", | |
1417 | "", | |
1418 | " % set endpoint coords of curve; higher if curve is short", | |
1419 | " /curvex1 curvel 1 sub space mul x add def", | |
1420 | " /curvex2 curver 1 sub space mul x add def", | |
1421 | " /curvey 1 minfret sub space mul y add def", | |
1422 | " strdiff 3 lt {", | |
1423 | " /curvey 0.2 strdiff div space mul curvey add def", | |
1424 | " } if", | |
1425 | "", | |
1426 | " % move to left end, set other points, draw curve", | |
1427 | " curvex1 curvey moveto", | |
1428 | "", | |
1429 | " curvex1 curvex2 curvex1 sub 3 div add", | |
1430 | " curvey space 0.4 strdiff sqrt mul mul add", | |
1431 | "", | |
1432 | " curvex2 curvex2 curvex1 sub 3 div sub", | |
1433 | " curvey space 0.4 strdiff sqrt mul mul add", | |
1434 | "", | |
1435 | " curvex2 curvey curveto stroke", | |
1436 | " } if", | |
1437 | "", | |
1438 | " space 10 div setlinewidth", | |
1439 | "", | |
1440 | " % draw dots and x and o marks", | |
1441 | " 0 1 strings 1 sub { % loop from left string to right string", | |
1442 | " /strno exch def % first string is 0", | |
1443 | " /grid_p grid_positions strno get def", | |
1444 | " /strx strno space mul x add def", | |
1445 | "", | |
1446 | " % set Y of mark higher if curved line covers this string", | |
1447 | " strno 1 add curvel ge strno 1 add curver le and {", | |
1448 | " /marky hmarky def", | |
1449 | " } {", | |
1450 | " /marky lmarky def", | |
1451 | " } ifelse", | |
1452 | "", | |
1453 | " grid_p -1 eq { % draw an X above the string", | |
1454 | " /xhwid space 3 div def", | |
1455 | " strx xhwid sub marky xhwid sub moveto", | |
1456 | " strx xhwid add marky xhwid add lineto stroke", | |
1457 | " strx xhwid sub marky xhwid add moveto", | |
1458 | " strx xhwid add marky xhwid sub lineto stroke", | |
1459 | " } if", | |
1460 | " grid_p 0 eq { % draw a circle above the string", | |
1461 | " strx marky space 0.3 mul 0 360 arc stroke", | |
1462 | " } if", | |
1463 | " grid_p 1 ge { % draw a dot by the proper fret", | |
1464 | " strx y grid_p space mul sub space 3 div add", | |
1465 | " space 3 div 0 360 arc fill", | |
1466 | " } if", | |
1467 | " } for", | |
1468 | "", | |
1469 | " % print \"X fr\" if requested", | |
1470 | " fretno 0 gt {", | |
1471 | " /Palatino-Roman findfont space 1.9 mul scalefont setfont", | |
1472 | " x strings 0.5 sub space mul add", | |
1473 | " y space numvert 0.3 add mul sub moveto", | |
1474 | " fretno 2 string cvs show ( fr) show", | |
1475 | " } if", | |
1476 | " grestore", | |
1477 | "} def", | |
1478 | "", | |
1479 | "% x1 y1 x2 y2 whitebox draw a white rectangle with opposite", | |
1480 | "% corners of (x1,y1) and (x2,y2)", | |
1481 | "/whitebox {", | |
1482 | " /y2 exch def", | |
1483 | " /x2 exch def", | |
1484 | " /y1 exch def", | |
1485 | " /x1 exch def", | |
1486 | " 1.0 setgray", | |
1487 | " newpath", | |
1488 | " x1 y1 moveto", | |
1489 | " x1 y2 lineto", | |
1490 | " x2 y2 lineto", | |
1491 | " x2 y1 lineto", | |
1492 | " closepath", | |
1493 | " fill", | |
1494 | " stroke", | |
1495 | " 0.0 setgray", | |
1496 | "} def", | |
1497 | "", | |
1498 | "", | |
1499 | "/LineNum 0 def", | |
1500 | "/InputFile (unknown) def", | |
1501 | "", | |
1502 | "% n linenum", | |
1503 | "/linenum {", | |
1504 | " /LineNum exch def", | |
1505 | "} def", | |
1506 | "", | |
1507 | "% (inputfilename) inputfile", | |
1508 | "/inputfile {", | |
1509 | " /InputFile exch def", | |
1510 | "} def", | |
1511 | "", | |
1512 | "% find size of Encoding and make a dictionary", | |
1513 | "% that size for bounding box information", | |
1514 | "mfont0 begin", | |
1515 | "/dictsize Encoding length def", | |
1516 | "mfont0 /Mcbbox0 dictsize dict put", | |
1517 | "", | |
1518 | "% temporarily redefine printmchar0 to get code", | |
1519 | "5 dict begin", | |
1520 | "/printmchar0 { {} forall } def", | |
1521 | "", | |
1522 | "Mcbbox0 Encoding 128rest get [ 1140.0 0 -515.0 -1515.0 615.0 1685.0 ] put", | |
1523 | "Mcbbox0 Encoding 16rest get [ 830.0 0 -415.0 -1215.0 405.0 485.0 ] put", | |
1524 | "Mcbbox0 Encoding 1n get [ 1080.0 0 -535.0 -335.0 535.0 345.0 ] put", | |
1525 | "Mcbbox0 Encoding 1rest get [ 1540.0 0 -765.0 -5.0 765.0 645.0 ] put", | |
1526 | "Mcbbox0 Encoding 256rest get [ 1250.0 0 -625.0 -2115.0 615.0 1685.0 ] put", | |
1527 | "Mcbbox0 Encoding 2n get [ 880.0 0 -435.0 -345.0 435.0 355.0 ] put", | |
1528 | "Mcbbox0 Encoding 2rest get [ 1540.0 0 -765.0 -45.0 765.0 315.0 ] put", | |
1529 | "Mcbbox0 Encoding 32rest get [ 940.0 0 -415.0 -1215.0 515.0 1085.0 ] put", | |
1530 | "Mcbbox0 Encoding 4n get [ 840.0 0 -415.0 -335.0 415.0 345.0 ] put", | |
1531 | "Mcbbox0 Encoding 4rest get [ 650.0 0 -345.0 -885.0 295.0 985.0 ] put", | |
1532 | "Mcbbox0 Encoding 64rest get [ 1040.0 0 -515.0 -1515.0 515.0 1085.0 ] put", | |
1533 | "Mcbbox0 Encoding 8rest get [ 750.0 0 -305.0 -615.0 435.0 485.0 ] put", | |
1534 | "Mcbbox0 Encoding acc_gt get [ 1170.0 0 -525.0 -335.0 635.0 345.0 ] put", | |
1535 | "Mcbbox0 Encoding acc_hat get [ 780.0 0 -385.0 -5.0 385.0 875.0 ] put", | |
1536 | "Mcbbox0 Encoding acc_uhat get [ 780.0 0 -385.0 -5.0 385.0 875.0 ] put", | |
1537 | "Mcbbox0 Encoding begped get [ 470.0 0 -245.0 -45.0 215.0 615.0 ] put", | |
1538 | "Mcbbox0 Encoding cclef get [ 1540.0 0 -765.0 -1245.0 765.0 1255.0 ] put", | |
1539 | "Mcbbox0 Encoding coda get [ 1640.0 0 -815.0 -855.0 815.0 865.0 ] put", | |
1540 | "Mcbbox0 Encoding com get [ 1100.0 0 -575.0 -635.0 515.0 655.0 ] put", | |
1541 | "Mcbbox0 Encoding copyright get [ 920.0 0 -455.0 -45.0 455.0 855.0 ] put", | |
1542 | "Mcbbox0 Encoding cut get [ 1100.0 0 -575.0 -905.0 515.0 915.0 ] put", | |
1543 | "Mcbbox0 Encoding dblflat get [ 1170.0 0 -595.0 -405.0 565.0 1115.0 ] put", | |
1544 | "Mcbbox0 Encoding dblsharp get [ 720.0 0 -355.0 -345.0 355.0 355.0 ] put", | |
1545 | "Mcbbox0 Encoding dblwhole get [ 1090.0 0 -535.0 -605.0 545.0 615.0 ] put", | |
1546 | "Mcbbox0 Encoding diamond get [ 880.0 0 -435.0 -305.0 435.0 315.0 ] put", | |
1547 | "Mcbbox0 Encoding dim get [ 540.0 0 -265.0 -5.0 265.0 905.0 ] put", | |
1548 | "Mcbbox0 Encoding dn128n get [ 840.0 0 -415.0 -3545.0 415.0 345.0 ] put", | |
1549 | "Mcbbox0 Encoding dn16n get [ 840.0 0 -415.0 -2105.0 415.0 345.0 ] put", | |
1550 | "Mcbbox0 Encoding dn256n get [ 840.0 0 -415.0 -3965.0 415.0 345.0 ] put", | |
1551 | "Mcbbox0 Encoding dn2n get [ 880.0 0 -435.0 -2105.0 435.0 355.0 ] put", | |
1552 | "Mcbbox0 Encoding dn32n get [ 840.0 0 -415.0 -2585.0 415.0 345.0 ] put", | |
1553 | "Mcbbox0 Encoding dn4n get [ 840.0 0 -415.0 -2105.0 415.0 345.0 ] put", | |
1554 | "Mcbbox0 Encoding dn64n get [ 840.0 0 -415.0 -3065.0 415.0 345.0 ] put", | |
1555 | "Mcbbox0 Encoding dn8n get [ 840.0 0 -415.0 -2105.0 415.0 345.0 ] put", | |
1556 | "Mcbbox0 Encoding dnbow get [ 810.0 0 -395.0 -5.0 405.0 915.0 ] put", | |
1557 | "Mcbbox0 Encoding dnflag get [ 640.0 0 -335.0 -1705.0 295.0 15.0 ] put", | |
1558 | "Mcbbox0 Encoding dot get [ 280.0 0 -135.0 -125.0 135.0 135.0 ] put", | |
1559 | "Mcbbox0 Encoding dwhdiamond get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1560 | "Mcbbox0 Encoding dwhrest get [ 340.0 0 -165.0 -5.0 165.0 615.0 ] put", | |
1561 | "Mcbbox0 Encoding endped get [ 480.0 0 -215.0 -45.0 255.0 615.0 ] put", | |
1562 | "Mcbbox0 Encoding fclef get [ 1840.0 0 -1015.0 -1705.0 815.0 655.0 ] put", | |
1563 | "Mcbbox0 Encoding ferm get [ 1640.0 0 -815.0 -5.0 815.0 1015.0 ] put", | |
1564 | "Mcbbox0 Encoding filldiamond get [ 880.0 0 -435.0 -305.0 435.0 315.0 ] put", | |
1565 | "Mcbbox0 Encoding flat get [ 580.0 0 -295.0 -405.0 275.0 1115.0 ] put", | |
1566 | "Mcbbox0 Encoding gclef get [ 1790.0 0 -915.0 -1605.0 865.0 3015.0 ] put", | |
1567 | "Mcbbox0 Encoding halfdim get [ 760.0 0 -375.0 -5.0 375.0 1015.0 ] put", | |
1568 | "Mcbbox0 Encoding invmor get [ 1320.0 0 -655.0 -455.0 655.0 465.0 ] put", | |
1569 | "Mcbbox0 Encoding invturn get [ 1300.0 0 -645.0 -335.0 645.0 345.0 ] put", | |
1570 | "Mcbbox0 Encoding leg get [ 840.0 0 -415.0 -55.0 415.0 65.0 ] put", | |
1571 | "Mcbbox0 Encoding ll1rest get [ 840.0 0 -415.0 -5.0 415.0 625.0 ] put", | |
1572 | "Mcbbox0 Encoding ll2rest get [ 840.0 0 -415.0 -15.0 415.0 315.0 ] put", | |
1573 | "Mcbbox0 Encoding measrpt get [ 1300.0 0 -645.0 -675.0 645.0 685.0 ] put", | |
1574 | "Mcbbox0 Encoding mor get [ 1320.0 0 -655.0 -285.0 655.0 295.0 ] put", | |
1575 | "Mcbbox0 Encoding nat get [ 520.0 0 -255.0 -855.0 255.0 865.0 ] put", | |
1576 | "Mcbbox0 Encoding pedal get [ 1040.0 0 -515.0 -45.0 515.0 675.0 ] put", | |
1577 | "Mcbbox0 Encoding qwhrest get [ 340.0 0 -165.0 -605.0 165.0 615.0 ] put", | |
1578 | "Mcbbox0 Encoding rr get [ 940.0 0 -465.0 -25.0 465.0 1035.0 ] put", | |
1579 | "Mcbbox0 Encoding sharp get [ 700.0 0 -345.0 -935.0 345.0 945.0 ] put", | |
1580 | "Mcbbox0 Encoding sign get [ 1340.0 0 -665.0 -825.0 665.0 835.0 ] put", | |
1581 | "Mcbbox0 Encoding tr get [ 1440.0 0 -715.0 -5.0 715.0 1015.0 ] put", | |
1582 | "Mcbbox0 Encoding triangle get [ 800.0 0 -395.0 -45.0 395.0 785.0 ] put", | |
1583 | "Mcbbox0 Encoding turn get [ 1300.0 0 -645.0 -325.0 645.0 345.0 ] put", | |
1584 | "Mcbbox0 Encoding uferm get [ 1640.0 0 -815.0 -5.0 815.0 1015.0 ] put", | |
1585 | "Mcbbox0 Encoding up128n get [ 1390.0 0 -745.0 -335.0 635.0 3555.0 ] put", | |
1586 | "Mcbbox0 Encoding up16n get [ 1390.0 0 -745.0 -335.0 635.0 2115.0 ] put", | |
1587 | "Mcbbox0 Encoding up256n get [ 1390.0 0 -745.0 -335.0 635.0 3975.0 ] put", | |
1588 | "Mcbbox0 Encoding up2n get [ 880.0 0 -435.0 -345.0 435.0 2115.0 ] put", | |
1589 | "Mcbbox0 Encoding up32n get [ 1390.0 0 -745.0 -335.0 635.0 2595.0 ] put", | |
1590 | "Mcbbox0 Encoding up4n get [ 850.0 0 -415.0 -335.0 425.0 2115.0 ] put", | |
1591 | "Mcbbox0 Encoding up64n get [ 1390.0 0 -745.0 -335.0 635.0 3075.0 ] put", | |
1592 | "Mcbbox0 Encoding up8n get [ 1390.0 0 -745.0 -335.0 635.0 2115.0 ] put", | |
1593 | "Mcbbox0 Encoding upbow get [ 720.0 0 -355.0 -115.0 355.0 925.0 ] put", | |
1594 | "Mcbbox0 Encoding upflag get [ 640.0 0 -335.0 -5.0 295.0 1715.0 ] put", | |
1595 | "Mcbbox0 Encoding uwedge get [ 340.0 0 -165.0 -5.0 165.0 505.0 ] put", | |
1596 | "Mcbbox0 Encoding wedge get [ 340.0 0 -165.0 5.0 165.0 515.0 ] put", | |
1597 | "Mcbbox0 Encoding xnote get [ 880.0 0 -435.0 -365.0 435.0 375.0 ] put", | |
1598 | "", | |
1599 | "end", | |
1600 | "end", | |
1601 | "", | |
1602 | "/Mfont0 mfont0 definefont", | |
1603 | "", | |
1604 | "", | |
1605 | "% find size of Encoding and make a dictionary", | |
1606 | "% that size for bounding box information", | |
1607 | "mfont1 begin", | |
1608 | "/dictsize Encoding length def", | |
1609 | "mfont1 /Mcbbox1 dictsize dict put", | |
1610 | "", | |
1611 | "% temporarily redefine printmchar1 to get code", | |
1612 | "5 dict begin", | |
1613 | "/printmchar1 { {} forall } def", | |
1614 | "", | |
1615 | "Mcbbox1 Encoding blankhead get [ 880.0 0 -435.0 -275.0 435.0 285.0 ] put", | |
1616 | "Mcbbox1 Encoding dwhisostriangle get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1617 | "Mcbbox1 Encoding dwhpiewedge get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1618 | "Mcbbox1 Encoding dwhrectangle get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1619 | "Mcbbox1 Encoding dwhrighttriangle get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1620 | "Mcbbox1 Encoding dwhsemicircle get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1621 | "Mcbbox1 Encoding dwhslashhead get [ 1410.0 0 -695.0 -725.0 705.0 735.0 ] put", | |
1622 | "Mcbbox1 Encoding fillisostriangle get [ 880.0 0 -435.0 -275.0 435.0 315.0 ] put", | |
1623 | "Mcbbox1 Encoding fillpiewedge get [ 880.0 0 -435.0 -305.0 435.0 285.0 ] put", | |
1624 | "Mcbbox1 Encoding fillrectangle get [ 880.0 0 -435.0 -275.0 435.0 285.0 ] put", | |
1625 | "Mcbbox1 Encoding fillrighttriangle get [ 880.0 0 -435.0 -305.0 435.0 285.0 ] put", | |
1626 | "Mcbbox1 Encoding fillsemicircle get [ 880.0 0 -435.0 -305.0 435.0 285.0 ] put", | |
1627 | "Mcbbox1 Encoding fillslashhead get [ 1300.0 0 -645.0 -675.0 645.0 685.0 ] put", | |
1628 | "Mcbbox1 Encoding isostriangle get [ 880.0 0 -435.0 -275.0 435.0 315.0 ] put", | |
1629 | "Mcbbox1 Encoding piewedge get [ 880.0 0 -435.0 -305.0 435.0 285.0 ] put", | |
1630 | "Mcbbox1 Encoding rectangle get [ 880.0 0 -435.0 -275.0 435.0 285.0 ] put", | |
1631 | "Mcbbox1 Encoding righttriangle get [ 880.0 0 -435.0 -305.0 435.0 285.0 ] put", | |
1632 | "Mcbbox1 Encoding semicircle get [ 880.0 0 -435.0 -305.0 435.0 285.0 ] put", | |
1633 | "Mcbbox1 Encoding slashhead get [ 1380.0 0 -685.0 -725.0 685.0 735.0 ] put", | |
1634 | "Mcbbox1 Encoding udwhrighttriangle get [ 950.0 0 -465.0 -605.0 475.0 615.0 ] put", | |
1635 | "Mcbbox1 Encoding ufillrighttriangle get [ 880.0 0 -435.0 -275.0 435.0 315.0 ] put", | |
1636 | "Mcbbox1 Encoding urighttriangle get [ 880.0 0 -435.0 -275.0 435.0 315.0 ] put", | |
1637 | "", | |
1638 | "end", | |
1639 | "end", | |
1640 | "", | |
1641 | "/Mfont1 mfont1 definefont", | |
1642 | "", | |
1643 | "/makeExtEncoding {", | |
1644 | " /extendedencoding 256 array def", | |
1645 | " StandardEncoding extendedencoding copy", | |
1646 | " extendedencoding 32 /exclamdown put", | |
1647 | " extendedencoding 33 /cent put", | |
1648 | " extendedencoding 34 /sterling put", | |
1649 | " extendedencoding 35 /yen put", | |
1650 | " extendedencoding 36 /quotedblleft put", | |
1651 | " extendedencoding 37 /guillemotleft put", | |
1652 | " extendedencoding 38 /guillemotright put", | |
1653 | " extendedencoding 39 /guilsinglleft put", | |
1654 | " extendedencoding 40 /guilsinglright put", | |
1655 | " extendedencoding 41 /dagger put", | |
1656 | " extendedencoding 42 /daggerdbl put", | |
1657 | " extendedencoding 43 /bullet put", | |
1658 | " extendedencoding 44 /quotedblbase put", | |
1659 | " extendedencoding 45 /quotedblright put", | |
1660 | " extendedencoding 46 /questiondown put", | |
1661 | " extendedencoding 47 /grave put", | |
1662 | " extendedencoding 48 /acute put", | |
1663 | " extendedencoding 49 /macron put", | |
1664 | " extendedencoding 50 /breve put", | |
1665 | " extendedencoding 51 /dotaccent put", | |
1666 | " extendedencoding 52 /dieresis put", | |
1667 | " extendedencoding 53 /ring put", | |
1668 | " extendedencoding 54 /cedilla put", | |
1669 | " extendedencoding 55 /hungarumlaut put", | |
1670 | " extendedencoding 56 /ogonek put", | |
1671 | " extendedencoding 57 /caron put", | |
1672 | " extendedencoding 58 /emdash put", | |
1673 | " extendedencoding 59 /AE put", | |
1674 | " extendedencoding 60 /ae put", | |
1675 | " extendedencoding 61 /ordfeminine put", | |
1676 | " extendedencoding 62 /ordmasculine put", | |
1677 | " extendedencoding 63 /Lslash put", | |
1678 | " extendedencoding 64 /lslash put", | |
1679 | " extendedencoding 65 /Oslash put", | |
1680 | " extendedencoding 66 /oslash put", | |
1681 | " extendedencoding 67 /OE put", | |
1682 | " extendedencoding 68 /oe put", | |
1683 | " extendedencoding 69 /dotlessi put", | |
1684 | " extendedencoding 70 /germandbls put", | |
1685 | " extendedencoding 71 /Aacute put", | |
1686 | " extendedencoding 72 /aacute put", | |
1687 | " extendedencoding 73 /Acircumflex put", | |
1688 | " extendedencoding 74 /acircumflex put", | |
1689 | " extendedencoding 75 /Adieresis put", | |
1690 | " extendedencoding 76 /adieresis put", | |
1691 | " extendedencoding 77 /Agrave put", | |
1692 | " extendedencoding 78 /agrave put", | |
1693 | " extendedencoding 79 /Aring put", | |
1694 | " extendedencoding 80 /aring put", | |
1695 | " extendedencoding 81 /Atilde put", | |
1696 | " extendedencoding 82 /atilde put", | |
1697 | " extendedencoding 83 /Ccedilla put", | |
1698 | " extendedencoding 84 /ccedilla put", | |
1699 | " extendedencoding 85 /Eacute put", | |
1700 | " extendedencoding 86 /eacute put", | |
1701 | " extendedencoding 87 /Ecircumflex put", | |
1702 | " extendedencoding 88 /ecircumflex put", | |
1703 | " extendedencoding 89 /Edieresis put", | |
1704 | " extendedencoding 90 /edieresis put", | |
1705 | " extendedencoding 91 /Egrave put", | |
1706 | " extendedencoding 92 /egrave put", | |
1707 | " extendedencoding 93 /Iacute put", | |
1708 | " extendedencoding 94 /iacute put", | |
1709 | " extendedencoding 95 /Icircumflex put", | |
1710 | " extendedencoding 96 /icircumflex put", | |
1711 | " extendedencoding 97 /Idieresis put", | |
1712 | " extendedencoding 98 /idieresis put", | |
1713 | " extendedencoding 99 /Igrave put", | |
1714 | " extendedencoding 100 /igrave put", | |
1715 | " extendedencoding 101 /Ntilde put", | |
1716 | " extendedencoding 102 /ntilde put", | |
1717 | " extendedencoding 103 /Oacute put", | |
1718 | " extendedencoding 104 /oacute put", | |
1719 | " extendedencoding 105 /Ocircumflex put", | |
1720 | " extendedencoding 106 /ocircumflex put", | |
1721 | " extendedencoding 107 /Odieresis put", | |
1722 | " extendedencoding 108 /odieresis put", | |
1723 | " extendedencoding 109 /Ograve put", | |
1724 | " extendedencoding 110 /ograve put", | |
1725 | " extendedencoding 111 /Otilde put", | |
1726 | " extendedencoding 112 /otilde put", | |
1727 | " extendedencoding 113 /Scaron put", | |
1728 | " extendedencoding 114 /scaron put", | |
1729 | " extendedencoding 115 /Uacute put", | |
1730 | " extendedencoding 116 /uacute put", | |
1731 | " extendedencoding 117 /Ucircumflex put", | |
1732 | " extendedencoding 118 /ucircumflex put", | |
1733 | " extendedencoding 119 /Udieresis put", | |
1734 | " extendedencoding 120 /udieresis put", | |
1735 | " extendedencoding 121 /Ugrave put", | |
1736 | " extendedencoding 122 /ugrave put", | |
1737 | " extendedencoding 123 /Ydieresis put", | |
1738 | " extendedencoding 124 /ydieresis put", | |
1739 | " extendedencoding 125 /Zcaron put", | |
1740 | " extendedencoding 126 /zcaron put", | |
1741 | " extendedencoding 127 /space put", | |
1742 | "} def", | |
1743 | "", | |
1744 | "/makeExtendedFont {", | |
1745 | " findfont", | |
1746 | " dup length dict /newdict exch def", | |
1747 | " { 1 index /FID ne", | |
1748 | " { newdict 3 1 roll put }", | |
1749 | " { pop pop }", | |
1750 | " ifelse", | |
1751 | " } forall", | |
1752 | " newdict /Encoding extendedencoding put", | |
1753 | " newdict /UniqueID newdict /UniqueID get 1 add put", | |
1754 | " newdict definefont pop", | |
1755 | "} def", | |
1756 | (char *) 0 | |
1757 | }; | |
1758 | ||
1759 | /* generate the PostScript prolog */ | |
1760 | ||
1761 | void | |
1762 | ps_prolog() | |
1763 | { | |
1764 | int line; | |
1765 | ||
1766 | for (line = 0; prolog_text[line] != (char *) 0; line++) { | |
1767 | (void) printf("%s\n", prolog_text[line]); | |
1768 | } | |
1769 | } |