1 % -*- Fundamental -*- (emacs-20 mf mode mucks
2 % feta-slag.mf -- implement trill symbols
4 % source file of the Feta (defintively not an abbreviation for Font-En-Tja)
7 % (c) 1998 Jan Nieuwenhuizen <jan@digicash.com>
10 % this file is included by feta-scripts.mf
13 twidth# := 0.5interline#;
14 theight# := 0.55interline#;
15 tthin# := stafflinethickness#;
16 toverlap# := tfat*twidth#+tthin#;
17 define_pixels(twidth,theight,tthin,toverlap);
19 def draw_trillelement =
22 pickup pencircle scaled tthin;
28 z3 - z1 = whatever * (0.5twidth, theight);
32 p = z3 -- z2 -- z1 -- z2;
33 p := p -- (p scaled -1) -- cycle;
40 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
42 currentpicture := currentpicture shifted (twidth-0.5toverlap, 0);
45 def draw_trill_three =
47 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
49 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
51 currentpicture := currentpicture shifted (2twidth-toverlap, 0);
56 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
58 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
60 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
62 currentpicture := currentpicture shifted (3twidth-1.5toverlap, 0);
65 def draw_mordent(expr a) =
66 pickup pencircle scaled tthin;
74 fet_beginchar("trilelement", "trilelement", "trilelement")
75 % set_char_box(twidth#, twidth#, theight#, theight#);
76 set_char_box(twidth#, twidth#-toverlap#, theight#, theight#);
80 fet_beginchar("prall", "prall", "prall")
82 set_char_box(trills*twidth#-0.5toverlap#, trills*twidth#-0.5toverlap#, theight#, theight#);
86 fet_beginchar("mordent", "mordent", "mordent")
88 set_char_box(trills*twidth#-0.5toverlap#, trills*twidth#-0.5toverlap#, theight#, theight#);
94 % in modern typesetting, i've seen these double symbols implemented
95 % as three trills rather than the actual double four [gerou and lusk].
96 % it looks nicer and i don't think it introduces ambiguity.
97 % would like to have more references -- jcn.
99 fet_beginchar("prallprall", "prallprall", "prallprall")
101 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
103 draw_mordent(twidth);
106 fet_beginchar("prallmordent", "prallmordent", "prallmordent")
108 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
110 draw_mordent(twidth-toverlap);
115 fet_beginchar("upprall", "upprall", "upprall")
118 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
119 draw_slur(-2twidth#,-2theight#,-1);
120 currentpicture := currentpicture shifted (-0.5w+1.5tthin,-tfat*theight);
125 fet_beginchar("downprall", "downprall", "downprall")
127 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
128 draw_slur(-2twidth#,2theight#,1);
129 currentpicture := currentpicture shifted (-0.5w+1.5tthin,-tfat*theight);