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--2002 Jan Nieuwenhuizen <janneke@gnu.org>
10 % this file is included by feta-scripts.mf
13 %twidth# := 0.5staff_space#;
14 %theight# := 0.55staff_space#;
15 % tthin# := stafflinethickness#;
16 tthin# := 1.6stafflinethickness#;
18 twidth# := 2/3staff_space#;
19 theight# := 1/2staff_space#;
22 % toverlap# := tfat*twidth#+tthin#;
23 toverlap# := tfat*twidth#+0.45tthin#;
24 define_pixels(twidth,theight,tthin,toverlap);
26 def draw_trillelement =
29 pickup pencircle scaled tthin;
36 z3 - z1 = whatever * (0.5twidth, theight);
40 p = z3 -- z2 -- z1 -- z2;
41 p := p -- (p scaled -1) -- cycle;
48 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
50 currentpicture := currentpicture shifted (twidth-0.5toverlap, 0);
53 def draw_trill_three =
55 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
57 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
59 currentpicture := currentpicture shifted (2twidth-toverlap, 0);
64 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
66 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
68 currentpicture := currentpicture shifted (-2*twidth+toverlap, 0);
70 currentpicture := currentpicture shifted (3twidth-1.5toverlap, 0);
73 def draw_mordent(expr a) =
74 pickup pencircle scaled tthin;
82 fet_beginchar("trilelement", "trilelement", "trilelement")
83 % set_char_box(twidth#, twidth#, theight#, theight#);
84 set_char_box(twidth#, twidth#-toverlap#, theight#, theight#);
88 fet_beginchar("prall", "prall", "prall")
90 set_char_box(trills*twidth#-0.5toverlap#, trills*twidth#-0.5toverlap#, theight#, theight#);
94 fet_beginchar("mordent", "mordent", "mordent")
96 set_char_box(trills*twidth#-0.5toverlap#, trills*twidth#-0.5toverlap#, 4/3*theight#, 4/3*theight#);
102 % in modern typesetting, i've seen these double symbols implemented
103 % as three trills rather than the actual double four [gerou and lusk].
104 % it looks nicer and i don't think it introduces ambiguity.
105 % would like to have more references -- jcn.
107 fet_beginchar("prallprall", "prallprall", "prallprall")
109 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
113 fet_beginchar("prallmordent", "prallmordent", "prallmordent")
115 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, 4/3*theight#, 4/3*theight#);
117 draw_mordent(twidth-0.5toverlap);
123 % URG. The attached slurs look weird, and discontinuous in their connection to the
126 fet_beginchar("upprall", "upprall", "upprall")
129 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
130 % draw_slur(-2twidth#,-2theight#,0,-1);
131 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
132 draw_slur(0,-2theight#,0,-1);
133 % currentpicture := currentpicture shifted (-0.5w+1.3tthin,-tfat*theight+1.5tthin);
134 currentpicture := currentpicture shifted (-0.5w+1.65tthin,-tfat*theight+1.15tthin);
139 fet_beginchar("downprall", "downprall", "downprall")
141 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
142 % draw_slur(-2twidth#,2theight#,0,1);
143 draw_slur(0,2theight#,0,1);
144 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
145 currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.5tthin);
149 fet_beginchar("upmordent", "upmordent", "upmordent")
152 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, 4/3*theight#, 4/3*theight#);
153 % draw_slur(-2twidth#,-2theight#,0,-1);
154 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
155 draw_slur(0,-2theight#,0,-1);
156 % currentpicture := currentpicture shifted (-0.5w+1.3tthin,-tfat*theight+1.5tthin);
157 currentpicture := currentpicture shifted (-0.5w+1.65tthin,-tfat*theight+1.15tthin);
160 draw_mordent(twidth-0.5toverlap);
163 fet_beginchar("downmordent", "downmordent", "downmordent")
165 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, 4/3*theight#, 4/3*theight#);
166 % draw_slur(-2twidth#,2theight#,0,1);
167 draw_slur(0,2theight#,0,1);
168 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
169 currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.5tthin);
171 draw_mordent(twidth-0.5toverlap);
174 fet_beginchar("lineprall", "lineprall", "lineprall")
176 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, 4*theight#);
177 pickup pencircle scaled tthin;
178 draw (-0.5w+tthin,-tfat*theight+0.5tthin) -- (-0.5w+tthin,h);
182 fet_beginchar("pralldown", "pralldown", "pralldown")
185 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
186 % draw_slur(-2twidth#,-2theight#,0,-1);
187 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
188 draw_slur(0,-2theight#,0,-1);
189 % currentpicture := currentpicture shifted (-0.5w+1.3tthin,-tfat*theight+1.5tthin);
190 currentpicture := currentpicture shifted (-0.5w+1.65tthin,-tfat*theight+1.15tthin);
193 currentpicture := currentpicture xscaled -1;
196 fet_beginchar("prallup", "prallup", "prallup")
198 set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
199 % draw_slur(-2twidth#,2theight#,0,1);
200 draw_slur(0,2theight#,0,1);
201 % currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.75tthin);
202 currentpicture := currentpicture shifted (-0.5w+tthin,-tfat*theight+0.5tthin);
204 currentpicture := currentpicture xscaled -1;