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 tthin# := 1.6stafflinethickness#;
19 % toverlap# := tfat*twidth#+tthin#;
20 toverlap# := tfat*twidth#+0.45tthin#;
21 define_pixels(twidth,theight,tthin,toverlap);
23 def draw_trillelement =
26 pickup pencircle scaled tthin;
33 z3 - z1 = whatever * (0.5twidth, theight);
37 p = z3 -- z2 -- z1 -- z2;
38 p := p -- (p scaled -1) -- cycle;
45 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
47 currentpicture := currentpicture shifted (twidth-0.5toverlap, 0);
50 def draw_trill_three =
52 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
54 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
56 currentpicture := currentpicture shifted (2twidth-toverlap, 0);
61 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
63 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
65 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
67 currentpicture := currentpicture shifted (3twidth-1.5toverlap, 0);
70 def draw_mordent(expr a) =
71 pickup pencircle scaled tthin;
79 fet_beginchar("trilelement", "trilelement", "trilelement")
80 % set_char_box(twidth#, twidth#, theight#, theight#);
81 set_char_box(twidth#, twidth#-toverlap#, theight#, theight#);
85 fet_beginchar("prall", "prall", "prall")
87 set_char_box(trills*twidth#-0.5toverlap#, trills*twidth#-0.5toverlap#, theight#, theight#);
91 fet_beginchar("mordent", "mordent", "mordent")
93 set_char_box(trills*twidth#-0.5toverlap#, trills*twidth#-0.5toverlap#, theight#, theight#);
99 % in modern typesetting, i've seen these double symbols implemented
100 % as three trills rather than the actual double four [gerou and lusk].
101 % it looks nicer and i don't think it introduces ambiguity.
102 % would like to have more references -- jcn.
104 fet_beginchar("prallprall", "prallprall", "prallprall")
106 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
108 draw_mordent(twidth-0.5toverlap);
111 fet_beginchar("prallmordent", "prallmordent", "prallmordent")
113 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
115 draw_mordent(twidth-0.5toverlap);
120 fet_beginchar("upprall", "upprall", "upprall")
123 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
124 % draw_slur(-2twidth#,-2theight#,-1);
125 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
126 draw_slur(0,-2theight#,-1);
127 currentpicture := currentpicture shifted (-0.5w+1.3tthin,-tfat*theight+1.5tthin);
132 fet_beginchar("downprall", "downprall", "downprall")
134 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
135 % draw_slur(-2twidth#,2theight#,1);
136 draw_slur(0,2theight#,1);
137 currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);