1 % -*- Fundamental -*- (emacs-20 mf mode mucks
2 % feta-schrift.mf -- implement scripts
4 % source file of the Feta (defintively not an abbreviation for Font-En-Tja)
7 % (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 % Jan Nieuwenhuizen <janneke@gnu.org>
12 fet_begingroup("scripts")
15 save alpha, radius, crook_thinness, crook_fatness, dot_radius;
17 % [Wanske] and some Baerenreiter editions
18 % suggest ca 80 degrees iso half-circle
21 radius# = 1.25 staff_space#;
22 crook_thinness# = 1.5stafflinethickness#;
23 crook_fatness# = 4 stafflinethickness#;
25 radius# + crook_fatness#/2 = h#;
26 radius# + crook_thinness#/2 = w#;
27 set_char_box(w#, w#, crook_thinness#/2, h#);
29 define_pixels(radius, crook_thinness, crook_fatness);
30 dot_radius = round (4/6 crook_fatness);
33 penpos1(crook_thinness, 0);
34 penpos2(crook_fatness, -90);
38 fill z1l{dir (-alpha-90)}..{dir (90-alpha)}z1r..
39 {right}z2r -- z2l{left} .. cycle;
41 addto currentpicture also
42 currentpicture xscaled -1;
44 pickup pencircle scaled 2dot_radius;
46 bot y4 = - crook_thinness/2;
50 fet_beginchar("fermata up", "ufermata", "ufermata")
55 fet_beginchar("fermata down", "dfermata", "dfermata")
60 def draw_short_fermata =
61 save fat_factor, thinness, dot_radius;
62 set_char_box(staff_space#, staff_space#, 0, 2.2 staff_space#);
63 dot_radius# = 8/3*stafflinethickness#;
64 define_pixels(dot_radius)
67 thinness = 1.5 stafflinethickness;
69 pickup pencircle scaled thinness;
77 z1 - z4 = whatever * (charwd, -charht);
78 z4 = fat_factor [z3, z5];
80 filldraw z1 -- z2 -- z3 -- z4 -- cycle;
83 pickup pencircle scaled 2dot_radius;
89 fet_beginchar("short fermata up", "ushortfermata", "ushortfermata")
93 fet_beginchar("short fermata down", "dshortfermata", "dshortfermata")
98 def draw_long_fermata =
99 save stemthick, beamheight, dot_radius, wd;
100 define_pixels(wd, dot_radius)
102 wd# = 2.5 staff_space#;
103 stemthick = 1.5 stafflinethickness;
104 beamheight = 4 stafflinethickness;
105 dot_radius# = 8/3*stafflinethickness#;
106 set_char_box(wd#/2, wd#/2, 0, 3/2 staff_space#);
108 draw_rounded_block((-b, h-beamheight), (w, h), blot_diameter);
109 draw_rounded_block((-b, -d),(-b+stemthick, h-stemthick), stemthick);
110 addto currentpicture also currentpicture xscaled -1;
112 pickup pencircle scaled 2dot_radius;
118 fet_beginchar("long fermata up", "ulongfermata", "ulongfermata")
122 fet_beginchar("long fermata down", "dlongfermata", "dlongfermata")
127 def draw_very_long_fermata =
128 save ibeamheight, obeamheight;
129 save ihwd, ohwd, iht, oht; % inner/outer half_width/height
130 save stemthick, dot_radius;
131 define_pixels(ihwd, ohwd, iht, oht, dot_radius)
133 ihwd# = 1.0 staff_space#;
134 ohwd# = 1.5 staff_space#;
135 iht# = 0.9 staff_space#;
136 oht# = 1.6 staff_space#;
137 stemthick = 1.5 stafflinethickness;
138 ibeamheight = 3 stafflinethickness;
139 obeamheight = 5 stafflinethickness;
140 dot_radius# = 8/3*stafflinethickness#;
141 set_char_box(ohwd#, ohwd#, 0, oht#);
143 draw_rounded_block((-ohwd, oht-obeamheight), (ohwd, oht), blot_diameter);
144 draw_rounded_block((-ohwd, 0),(-ohwd+stemthick, ohwd-stemthick), stemthick);
145 draw_rounded_block((-ihwd, iht-ibeamheight), (ihwd, iht), blot_diameter);
146 draw_rounded_block((-ihwd, 0),(-ihwd+stemthick, ihwd-stemthick), stemthick);
147 addto currentpicture also currentpicture xscaled -1;
149 pickup pencircle scaled 2dot_radius;
155 fet_beginchar("very long fermata up", "uverylongfermata", "uverylongfermata")
156 draw_very_long_fermata;
159 fet_beginchar("very long fermata down", "dverylongfermata", "dverylongfermata")
160 draw_very_long_fermata;
165 % Thumbs are used in cello music.
166 % TODO : thumbs should look like the finger-font and should be placed in
167 % the same way in the score.
170 fet_beginchar("Thumb", "thumb", "thumb")
171 save thin, height, width, thick;
172 height# = 5/4 width#;
173 height# = staff_space#;
174 thin = 1.2 stafflinethickness;
176 set_char_box(width#/2, width#/2, height#/2, height#/2);
183 penstroke z1e{up} .. {left}z2e;
184 addto currentpicture also currentpicture xscaled -1;
185 addto currentpicture also currentpicture yscaled -1;
190 draw_brush(z3,1.4*thin, z4,0.9*thick);
194 % FIXME: rounded endings
196 % `\accent' is TeX reserved.
197 fet_beginchar("> accent", "sforzato", "sforzatoaccent")
198 set_char_box(.9 staff_space#, .9 staff_space#, .5 staff_space#, .5 staff_space#);
199 save thickness, diminish;
201 thickness = 3/2 stafflinethickness;
202 pickup pencircle scaled thickness;
204 % prevent blobs at crossing lines
210 y2 = .25 thickness* diminish;
214 z3 = whatever [z1, z4];
216 penpos2(thickness*(2 - diminish)/2 , 90);
217 penpos1(thickness, 90);
218 penpos3(thickness, 90);
221 draw (z1 .. z3) yscaled -1;
223 penstroke z3e .. z2e;
224 penstroke (z3e .. z2e) yscaled -1;
230 fet_beginchar("staccato dot", "staccato", "staccato")
232 radius# = 0.20 * staff_space#;
233 define_whole_pixels(radius);
234 pickup pencircle scaled 2 radius;
236 set_char_box(radius#, radius#, radius#, radius#);
239 def draw_staccatissimo =
241 height# = .8 staff_space#;
242 radius# = 2 stafflinethickness#;
243 define_whole_pixels(radius);
244 define_pixels(height);
246 draw_brush((0,0), stafflinethickness, (0, height),2 radius);
247 set_char_box(radius#,radius#, blot_diameter#/2, height# + radius#);
250 fet_beginchar("staccatissimo/martellato up", "ustaccatissimo",
255 fet_beginchar("staccatissimo/martellato down", "dstaccatissimo", "dstaccatissimo")
260 fet_beginchar("portato/single tenuto", "tenuto", "tenuto")
262 thick# = 1.6 stafflinethickness#;
263 define_whole_pixels(thick);
265 set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,thick#/2);
266 pickup pencircle scaled thick;
267 draw_rounded_block((-b,-thick/2),(w,thick/2),thick);
272 thick# = 1.4 stafflinethickness#;
273 radius# = 1.4 stafflinethickness#;
274 define_whole_pixels(thick,radius);
276 set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,.5 staff_space#+ radius#);
277 draw_rounded_block((-b,-thick/2),(w,thick/2),thick);
279 pickup pencircle scaled 2 radius;
284 fet_beginchar("portato/tenuto with staccato", "uportato",
290 fet_beginchar("portato/tenuto with staccato", "dportato",
298 save fat_factor, thinness;
299 set_char_box(staff_space#/2, staff_space#/2, 0, 1.1 staff_space#);
302 thinness = stafflinethickness;
304 pickup pencircle scaled thinness;
312 z1 - z4 = whatever * (charwd, -charht);
313 z4 = fat_factor [z3, z5];
315 filldraw z1 -- z2 -- z3 -- z4 -- cycle;
319 fet_beginchar("marcato up", "umarcato", "umarcato")
326 % The down marcato char (not very much used).
327 % Contrary to what some MF/TeX `gurus' believe
328 % it is *point*-symmetric with the "up" version
330 fet_beginchar("marcato down", "dmarcato", "dmarcato")
337 % used in french horn music todo
339 % TODO: too light at 20pt
340 fet_beginchar("open (unstopped)", "open", "ouvert")
341 save thin, height, width, thick;
342 height# = 5/4 width#;
343 height# = staff_space#;
344 thin = 1.2 stafflinethickness;
346 set_char_box(width#/2, width#/2, height#/2, height#/2);
353 penstroke z1e{up} .. {left}z2e;
354 addto currentpicture also currentpicture xscaled -1;
355 addto currentpicture also currentpicture yscaled -1;
359 fet_beginchar("plus (stopped)", "stopped", "plusstop")
361 thick = 2 stafflinethickness;
362 size# = 1.1 staff_space#;
364 set_char_box(size#/2, size#/2, size#/2, size#/2);
365 draw_rounded_block((-b,-thick/2),(w,thick/2),thick);
366 addto currentpicture also currentpicture rotated 90;
371 % A vee with tapered insides to prevent visual blotting
374 def draw_vee (expr width, height, thickness) =
380 pickup pencircle scaled thickness;
388 penpos3(thickness, 0);
389 penpos4(thickness * diminish, 0);
397 penstroke z3e .. z4e;
398 addto currentpicture also currentpicture xscaled -1;
402 fet_beginchar("Upbow", "upbow", "upbow")
403 save ht, wd, thick, diminish;
405 thick = 1.4 stafflinethickness;
406 wd# = 1.3 staff_space#;
408 set_char_box(wd#/2, wd#/2, 0, ht#);
409 draw_vee (wd, ht, thick);
413 fet_beginchar("Downbow", "downbow", "downbow")
414 save stemthick, beamheight;
418 wd# = 1.5 staff_space#;
419 stemthick = 1.2 stafflinethickness;
420 set_char_box(wd#/2, wd#/2, 0, 4/3 staff_space#);
424 draw_rounded_block((-b,h-beamheight),(w,h),blot_diameter);
425 draw_rounded_block((-b,-d),(-b+stemthick,h-stemthick),stemthick);
426 addto currentpicture also currentpicture xscaled -1;
430 % Inspired by a computer-set version of Auf dem Strom by Baerenreiter.
434 save thin, thick, ball_diam, darkness;
435 save wd, ht, thick_nibangle, ball_nib_thick;
439 wd# = 35/16 staff_space#;
440 ht# = 18/17 staff_space#;
441 darkness = 1.20 stafflinethickness;
443 set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
448 ball_nib_thick = 2.7 darkness;
449 ball_diam = ball_nib_thick + (h - ball_nib_thick) / 10;
460 penpos1(1.1 thick, thick_nibangle);
461 penpos2(thick, thick_nibangle);
463 penpos4(ball_nib_thick, -90);
466 swoosh := z1l{curl 0} .. z2l .. z3l{up} .. {left}z4l
467 -- z4r .. z3r{down} .. z2r{left} ;
468 fill swoosh .. (swoosh scaled -1) .. cycle;
471 y5r = y4l - ball_diam /2;
474 penpos5(1.6 ball_diam/2, 10);
475 penpos6(ball_diam/2, 150);
477 ploop := z4l{left} .. z5l .. z6l -- cycle;
479 fill ploop scaled -1;
484 fet_beginchar("Reverse turn","reverseturn","reverseturn")
486 currentpicture := currentpicture yscaled -1;
492 fet_beginchar("Turn","turn","turn")
502 % Inspired by a (by now) PD edition of Durand & C'ie edition of
503 % Saint-Saens' Celloconcerto no. 1
505 % FIXME take out hardcoded vars.
506 % FIXME the two loops on the `t' should be smoother (and the left one bigger).
507 % FIXME generic macros for serifs: top of the t and bottom of r
511 fet_beginchar("Trill (`tr')","trill","trill")
513 save start_nib_angle, ascender_extra, ex, hair_thick, fatness,
514 slant_angle, slant, t_fatness, r_fatness, kerning, t_overshoot,
515 uitschieter, bulb_size;
519 ascender_extra# = 1/2 ex#;
520 ascender# = ascender_extra# + ex#;
521 ex# = 1.4 staff_space#;
523 start_nib_angle = 20;
525 define_pixels(ex, ascender_extra, ascender, kerning);
527 t_overshoot = 0.03 ex;
529 t_fatness = 0.78 fatness;
530 t_width = 1.9 t_fatness;
531 r_fatness = 0.78 fatness;
532 uitschieter = 0.48 ex;
533 hair_thick = blot_diameter;
534 r_flare = 0.45 r_fatness;
535 r_width = 2 r_fatness + 0.25 kerning;
540 local_copy(transform)(currenttransform);
541 currenttransform := currenttransform slanted slant shifted (- staff_space, 0) ;
545 % try to position in such a way that the center is the visual
548 x1l = 0.2 staff_space;
549 x1r - x1l = t_fatness;
550 penpos1(start_nib_wid, start_nib_angle);
553 penpos2(start_nib_wid, start_nib_angle);
555 z3l = (x2l + 0.5 t_width, - t_overshoot);
557 z4l = (x2l + t_width, 0.23 ex);
558 penpos4(whatever, 200);
559 x4l - x4r = hair_thick;
561 x3r = 0.5 [x4r, x2r];
562 % 1.7 [x3l, x3r] = x4r;
563 y3r - y3l = 0.6 t_fatness;
567 path t_p, krul_p, r_p;
569 z5 = (x2l + t_fatness/2, 2/3 ex);
570 % penpos5(hair_thick, );
572 t_p := z1r{dir (angle(z1l-z1r) + 30)} .. z1l{-dir (angle(z1r-z1l) - 45)}
574 .. tension (1 + .5 slant)
577 .. z4l{up} -- z4r{down}
579 .. tension (1.5 + .7 slant)
580 .. z2r{up} .. z1r -- cycle;
585 pickup pencircle scaled hair_thick;
587 lft x6 = x2l - uitschieter;
588 y6 = y5 ; % - 1/20 ex;
590 z7 = z5 + whatever*dir krul_ang;
593 x7 = 5/10 kerning + x5;
595 penpos7(hair_thick, up_angle + 90);
600 penpos9(r_fatness, 0);
603 y10 = -0.3 stafflinethickness;
604 penpos10(r_fatness, 0);
612 r_p := z7l{z7-z5} .. z9l{down} --- simple_serif (z10l, z10r, -30)
614 .. z7r{z5-z7} -- cycle;
617 set_char_box(.85 staff_space# , .85 staff_space#, 0,ascender#);
620 penpos11(1/4 r_fatness, -4);
623 z13l = (x9l + r_width, y11 - stafflinethickness );
624 penpos13(r_flare, 180);
626 z15 = z13r - (bulb_size * r_fatness,0);
627 z14 = 0.5 [z13l, z15] - (0,bulb_size* r_fatness);
628 z16 = 0.5 [z13l, z15] + (0,bulb_size* r_fatness);
631 fill z11r{up} .. tension 0.94 .. z13r{down} -- z15{down}
632 .. tension 1.0 .. z13l{up}
633 .. z11l{down} -- cycle;
635 fill z15{up} .. tension 1.06 .. z13l{down} .. z14 .. cycle;
639 penlabels(range 1 thru 15);
645 save radius, thickness, wall;
647 radius# := .5 staff_space#;
649 define_pixels(radius);
650 set_char_box(radius#, radius#, radius#, 2/3 staff_space#);
652 thickness := 1.5 stafflinethickness;
653 pickup pencircle scaled thickness;
663 draw z1{down} .. z2{down} .. z3{left};
664 addto currentpicture also currentpicture xscaled -1;
669 fet_beginchar("left heel", "upedalheel", "upedalheel")
674 fet_beginchar("right heel", "dpedalheel", "dpedalheel")
682 thickness := 1.5 stafflinethickness;
683 ht# := 1.5 staff_space#;
685 define_pixels(ht,wd);
688 set_char_box(wd#, wd#, 0, ht#);
689 draw_vee (wd, ht, thickness);
692 fet_beginchar("left toe", "upedaltoe", "upedaltoe")
696 fet_beginchar("right toe", "dpedaltoe", "dpedaltoe")
701 fet_beginchar("Flageolet", "flageolet", "flageolet")
702 save height,width,thickness;
703 height#=4/15 staffsize#;
705 thickness#=blot_diameter#;
706 define_pixels(height,width,thickness);
707 set_char_box(width#/2,width#/2,height#/2,height#/2);
709 pickup pencircle scaled thickness;
713 rt x4 - lft x2 =width;
720 draw z1..z2..z3..z4..cycle;
723 fet_beginchar("Segno", "segno", "segno")
724 save thin, thick, ball_diam, darkness, pointheight;
725 save wd, ht, thick_nibangle, ball_nib_thick;
729 ht# = 3 staff_space#;
730 wd# = 2 staff_space#;
731 darkness = 1.20 stafflinethickness;
733 set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
738 ball_nib_thick = 2.7 darkness;
739 ball_diam = ball_nib_thick + (w - ball_nib_thick) / 10;
740 pointheight = 2 stafflinethickness;
750 penpos1(thick, 2 thick_nibangle);
751 penpos2(thick, thick_nibangle);
753 penpos4(ball_nib_thick, 180-thick_nibangle);
756 swoosh := z1l{curl 0} .. z2l .. z3l{right} .. {down}z4l
757 -- z4r .. z3r{left} .. z2r{down} ;
758 fill swoosh .. (swoosh scaled -1) .. cycle;
762 x5r = x4l - ball_diam /2;
765 penpos5(1.6 ball_diam/2, 100);
766 penpos6(ball_diam/2, 240);
768 ploop := z4l{down} .. z5l .. z6l -- cycle;
770 fill ploop scaled -1;
777 filldraw z7l--z8l{right}--z8r{down}--z7r{right}--cycle;
778 pickup pencircle scaled 2 thin;
779 draw (-x2r,pointheight);
780 draw (x2r,-pointheight);
783 fet_beginchar("Coda", "coda", "coda")
784 save thin, thick, codawidth, codaheight;
785 thin# = 1.2 stafflinethickness#;
786 thick# = 3.5 stafflinethickness#;
787 codawidth# = 2/3 staff_space#;
788 codaheight# = 1 staff_space#;
789 define_pixels(thin, thick, codawidth, codaheight);
791 set_char_box(codawidth#+thick#, codawidth#+thick#,
792 codaheight#+thick#, codaheight#+thick#);
805 halfcoda := z1l{up} .. z2l{right} .. z3l{down} --
806 z3r{up} .. z2r{left} .. z1r{down} .. cycle;
808 fill (halfcoda scaled -1);
810 draw_gridline((0,-h),(0,h),thin);
811 draw_gridline((-w,0),(w,0),thin);
815 fet_beginchar("Varied Coda", "varcoda", "varcoda")
816 save thin, thick, codawidth, codaheight;
817 thin# = 1.2 stafflinethickness#;
818 thick# = 3.5 stafflinethickness#;
819 codawidth# = 2/3 staff_space#;
820 codaheight# = 1 staff_space#;
821 define_pixels(thin, thick, codawidth, codaheight);
823 set_char_box(codawidth#+thick#, codawidth#+thick#,
824 codaheight#+thick#, codaheight#+thick#);
830 draw_rounded_block(z1, z2, thick);
836 draw_rounded_block(z3, z4, thick);
838 addto currentpicture also currentpicture xscaled -1;
839 addto currentpicture also currentpicture yscaled -1;
841 draw_gridline((0,-h),(0,h),thin);
842 draw_gridline((-w,0),(w,0),thin);
846 save alpha, thick, thin, ht;
848 thin# = 1.2 stafflinethickness#;
849 thick# = 3 stafflinethickness#;
850 ht# = .6staff_space#;
851 define_pixels(thin, thick,ht);
852 set_char_box(0, .5staff_space#, ht#, ht#);
854 penpos1(thick, alpha);
855 penpos2(thick, alpha+90);
856 penpos3(thin, 180-alpha);
857 penpos4(thin, 90-alpha);
864 fill z1l{dir (alpha+90)} .. z2r{dir alpha} .. z1r{dir (alpha-90)} ..
865 z3l{dir (270-alpha)} .. z4l{dir (alpha+180)} ..
866 z3r{dir (90-alpha)} .. cycle;
869 fet_beginchar("Right Comma","rcomma","rcomma");
873 fet_beginchar("Left Comma","lcomma","lcomma");
879 save thick, thin, ht, wd, alpha;
881 thin# = 1.2 stafflinethickness#;
882 thick# = 3 stafflinethickness#;
883 ht# = .6 staff_space#;
884 wd# = .25 staff_space#;
885 define_pixels(thin, thick, ht, alpha);
886 set_char_box(wd#, wd#, ht#, ht#);
889 draw_brush(z1, thin, z2, thick);
892 fet_beginchar("Right Varied Comma","rvarcomma","rvarcomma");
896 fet_beginchar("Left Varied Comma","lvarcomma","lvarcomma");
901 thick#:=1/24designsize;
902 define_blacker_pixels(thick);
904 rthin:=1/8*staff_space;
905 rthick:=2thick+rthin;
910 save ne,nw,se,sw; pair ne,nw,se,sw;
913 se=dir alpha; nw=dir (alpha+180);
914 ne=dir (alpha+90); sw=dir (alpha-90);
915 penpos1(rthin,alpha+90);
916 penpos2(5/4rthick,alpha);
917 penpos4(5/4rthick,alpha);
918 penpos5(rthin,alpha+90);
919 penpos3(3/4rthick,alpha);
921 z1=(width/2, height) - overshoot*se;
922 z2=2[z4,(width/2,height/2)];
927 z5=2[z1,(width/2,height/2)];
929 z7=z4l+1/2rthin*sw+1/2rthin*se;
930 z8=2[z6,(width/2,height/2)];
931 z9=2[z7,(width/2,height/2)];
933 fill z1l{se}..{se}z6..z3l..z7{se}..{se}z5l..z5r{nw}..{nw}z8..z3r..z9{nw}..{nw}z1r.. cycle;
934 penlabels(1,2,3,4,5,6,7,8,9);
937 fet_beginchar("Arpeggio","arpeggio","arpeggio");
938 %draw_staff (-2, 2, 0.0);
939 save height, overshoot, width;
940 height# = staff_space#;
942 overshoot# = 0.25 staff_space#;
943 define_pixels (height,overshoot,width);
944 set_char_box(0, width#, 0, height#);
948 % Extendable Trill symbol.
950 % Rename me to Trill, rename Trill to Tr?
951 fet_beginchar("Trill-element","trill-element","trillelement");
952 save height, overshoot;
953 height# = staff_space#;
955 overshoot# = 0.25 staff_space#;
956 define_pixels (height,overshoot,width);
957 set_char_box(0, height#, 0, width#);
959 currentpicture := currentpicture shifted -(width/2, height/2);
960 currentpicture := currentpicture rotated 90;
961 currentpicture := currentpicture shifted (height/2, width/2);
967 % Arpeggio arrow by Chris Jackson <chris@fluffhouse.org.uk>
970 def draw_arpeggio_arrow =
971 save thinness, height, width, overshoot, se, sw, ne, nw, alpha;
973 height# = staff_space#;
975 overshoot# = 0.25 staff_space#;
976 define_pixels (height,overshoot,width);
977 set_char_box(0, width#, 0, height#);
979 nw = dir (alpha+180);
980 sw = dir (alpha-90); se = dir alpha;
982 penpos1(rthin, alpha+90);
983 penpos2(5/4 rthick, alpha);
984 penpos3(5/4 rthick, 0);
986 z1 = (width/2, height) - overshoot*se; % numbering is consistent with the arpeggio symbol
987 z2 = 2[z4,(width/2,height/2)];
988 z3 = (0.5 width, 0.5 height);
989 z4 = (0.25 staff_space, rthin);
990 z6 = z2l + 1/2rthin*sw;
991 z9 = (width/2, height) + overshoot*se;
992 fill z1l {se}..{se} z6 .. z3l .. z3r.. z9{nw} ..{nw} z1r.. cycle;
994 bot z10 = ( 0.5w, 0 );
995 lft z11 = (-0.3w, 0.8h);
996 rt z12 = ( 1.3w, 0.8h);
997 pickup pencircle scaled 0.5 rthin;
998 filldraw z3 -- z12 {dir -130} .. {dir -110} z10 {dir 110} .. {dir 130} z11 -- cycle;
1001 fet_beginchar("Arpeggio arrow down", "arpeggio-arrow--1", "arpeggioarrowdown");
1002 draw_arpeggio_arrow;
1006 fet_beginchar("Arpeggio arrow up", "arpeggio-arrow-1", "arpeggioarrowup");
1007 draw_arpeggio_arrow;
1008 currentpicture := currentpicture scaled -1 shifted (0.8staff_space, staff_space);
1019 % I actually have no clue how they should look, so we use a slightly curvy
1020 % and tapered shape.
1022 fet_beginchar("Caesura", "caesura", "caesura");
1023 save slant, space_between, clearance;
1025 save botthick, topthick;
1030 botthick = 1.5 stafflinethickness;
1031 topthick = 2.5 stafflinethickness;
1032 pickup pencircle scaled botthick;
1036 space_between# = 0.6 staff_space#;
1037 clearance# = 0.2 staff_space#;
1038 height# = 1.2 staff_space#;
1040 set_char_box(0, 2.0 staff_space#, staff_space# - clearance#, height#);
1041 define_pixels (space_between, clearance, height);
1047 x2 = (y2 - y1) / slant;
1051 alpha = angle (z2 - z1);
1052 penpos1 (botthick, alpha - krom);
1053 penpos3 (botthick, alpha - krom + 90);
1055 penpos2 (topthick, alpha + krom );
1056 penpos4 (topthick, alpha + krom + 90);
1058 penlabels (1,2,3,4);
1060 p := z3r{(z1r - z1l)} .. z4r{z2r-z2l} .. z2r{z4l-z4r} .. z4l{z2l-z2r} .. z3l{z1l-z1r} .. z1l{z3r-z3l} .. cycle;
1062 fill p shifted (space_between , 0);
1067 fet_endgroup("scripts");