release commit
[lilypond.git] / mf / parmesan-rests.mf
blob314e39b9ad47ece5da6a72aeb1b04a8f44b969e1
1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-rests.mf -- implement ancient rests
3
4 % source file of LilyPond's pretty-but-neat music font
5
6 % (c) 2001--2004 Juergen Reuter <reuter@ipd.uka.de>
7
8 % Neo-mensural rests originally by
9 % Christian Mondrup and Mats Bengtsson
10
12 fet_begingroup("rests")
15 %%%%%%%%
19 % NEO-MENSURAL NOTATION
24 % Neo-mensural longa and breve are identical with default longa and breve.
26 neomens_block_rest_x# = 2/5 staff_space#;
27 neomens_block_rest_y# = 1/1 staff_space#;
28 neomens_half_block_rest_y# = 5/8 staff_space#;
30 define_pixels(neomens_block_rest_x,
31               neomens_block_rest_y, neomens_half_block_rest_y);
33 def neomens_half_block_rest =
34         draw_block ((0,0), (neomens_block_rest_x, neomens_half_block_rest_y));
35         enddef;
37 fet_beginchar("Neo-mensural maxima rest", "-3neo_mensural", "neomensmaximarest");
38         set_char_box(0, 3 neomens_block_rest_x#,
39                      neomens_block_rest_y#, neomens_block_rest_y#);
40         draw_block ((0,-neomens_block_rest_y),
41                      (neomens_block_rest_x, neomens_block_rest_y));
42         addto currentpicture also currentpicture shifted (2 neomens_block_rest_x, 0);
43 fet_endchar;
45 fet_beginchar("Neo-mensural longa rest", "-2neo_mensural", "neomenslongarest");
46         set_char_box(0, neomens_block_rest_x#,
47                      neomens_block_rest_y#, neomens_block_rest_y#);
48         draw_block ((0,-neomens_block_rest_y),
49                     (neomens_block_rest_x, neomens_block_rest_y));
50 fet_endchar;
52 fet_beginchar("Neo-mensural breve rest", "-1neo_mensural", "neomensbreverest");
53         set_char_box(0, neomens_block_rest_x#,
54                      0, neomens_block_rest_y#);
55         draw_block ((0,0), (neomens_block_rest_x, neomens_block_rest_y));
56 fet_endchar;
58 fet_beginchar("Neo-mensural whole rest", "0neo_mensural", "neomenssemibrevisrest");
59         set_char_box(0, neomens_block_rest_x#,
60                      neomens_half_block_rest_y#,  0);
61         neomens_half_block_rest;
62         currentpicture :=
63                 currentpicture shifted (0,- neomens_half_block_rest_y);
64 fet_endchar;
66 fet_beginchar("Neo-mensural half rest", "1neo_mensural", "neomensminimahalfrest");
67         set_char_box(0, neomens_block_rest_x#,
68                      0, neomens_half_block_rest_y#);
69         neomens_half_block_rest;
70 fet_endchar;
72 neomensrestsize# = 0.8 staff_space#;
74 fet_beginchar("Neo-mensural 4th rest","2neo_mensural","neomenssemiminimarest")
75         set_char_box(0,neomensrestsize#,0,neomensrestsize#);
76         pickup pencircle scaled 2 stafflinethickness;
77         lft x1 = 0;
78         bot y1 = 0;
79         lft x2 = 0;
80         top y2 = h;
81         rt x3 = w;
82         bot y3 = h/2;
83         draw z1 .. z2;
84         draw z2 .. z3;
85 fet_endchar
87 fet_beginchar("Neo-mensural 8th rest","3neo_mensural","neomensfusarest")
88         set_char_box(0,neomensrestsize#,0,neomensrestsize#);
89         pickup pencircle scaled 2 stafflinethickness;
90         rt x1 = w;
91         bot y1 = 0;
92         rt x2 = w;
93         top y2 = h;
94         lft x3 = 0;
95         bot y3 = h/2;
96         draw z1 .. z2;
97         draw z2 .. z3;
98 fet_endchar
100 fet_beginchar("Neo-mensural 16th rest","4neo_mensural","neomenssemifusarest")
101         set_char_box(0,neomensrestsize#,0,staff_space#);
102         pickup pencircle scaled 2 stafflinethickness;
103         rt x1 = w;
104         bot y1 = 0;
105         rt x2 = w;
106         top y2 = h;
108         draw z1 .. z2;
110         pickup pencircle scaled 2 stafflinethickness;
111         rt x3 = w;
112         top y3 = h;
113         lft x4 = 0;
114         bot y4 = h/2;
115         rt x5 = w;
116         top y5 = 5/8h;
117         lft x6 = 0;
118         bot y6 = h/8;
120         draw z3 .. z4;
121         draw z5 .. z6;
122 fet_endchar
125 %%%%%%%%
129 % MENSURAL NOTATION
134 pen_width# = 0.3 staff_space#;
135 pen_height# = 0;
136 pen_rotation = 30;
137 slight_pen_rotation = 15;
139 mens_block_rest_y# = 1/1 staff_space#;
140 mens_half_block_rest_y# = 5/8 staff_space#;
142 define_pixels(mens_block_rest_y, mens_half_block_rest_y,
143               pen_width, pen_height);
145 fet_beginchar("Mensural maxima rest", "-3mensural", "mensmaximarest");
146         set_char_box(0, pen_width#,
147                      mens_block_rest_y#, 2mens_block_rest_y#);
148         pickup pencircle
149                 xscaled pen_width
150                 yscaled pen_height
151                 rotated slight_pen_rotation;
152         draw (w/2, -mens_block_rest_y) -- (w/2, 2 mens_block_rest_y);
153 fet_endchar;
155 fet_beginchar("Mensural longa rest", "-2mensural", "menslongarest");
156         set_char_box(0, pen_width#,
157                      mens_block_rest_y#, mens_block_rest_y#);
158         pickup pencircle
159                 xscaled pen_width
160                 yscaled pen_height
161                 rotated slight_pen_rotation;
162         draw (w/2, -mens_block_rest_y) -- (w/2, mens_block_rest_y);
163 fet_endchar;
165 fet_beginchar("Mensural breve rest", "-1mensural", "mensbreverest");
166         set_char_box(0, pen_width#,
167                      0, mens_block_rest_y#);
168         pickup pencircle
169                 xscaled pen_width
170                 yscaled pen_height
171                 rotated slight_pen_rotation;
172         draw (w/2, 0) -- (w/2, mens_block_rest_y);
173 fet_endchar;
175 fet_beginchar("Mensural whole rest", "0mensural", "menssemibrevisrest");
176         set_char_box(0, pen_width#,
177                      mens_half_block_rest_y#, 0);
178         pickup pencircle
179                 xscaled pen_width
180                 yscaled pen_height
181                 rotated slight_pen_rotation;
182         draw (w/2, 0) -- (w/2, -mens_half_block_rest_y);
183 fet_endchar;
185 fet_beginchar("Mensural half rest", "1mensural", "mensminimahalfrest");
186         set_char_box(0, pen_width#,
187                      0, mens_half_block_rest_y#);
188         pickup pencircle
189                 xscaled pen_width
190                 yscaled pen_height
191                 rotated slight_pen_rotation;
192         draw (w/2, 0) -- (w/2, mens_half_block_rest_y);
193 fet_endchar;
195 mensrestsize# = .8staff_space#;
197 fet_beginchar("Mensural 4th rest","2mensural","menssemiminimarest")
198         set_char_box(0,mensrestsize#,0,mensrestsize#);
199         pickup pencircle
200                 xscaled pen_width
201                 yscaled pen_height
202                 rotated pen_rotation;
203         lft x1 =      0;     y1 = 0;
204         lft x2 =      0; top y2 = 5/8 h;
205         rt  x3 =  1/5 w; bot y3 = 6/8 h;
206         rt  x4 =      w; bot y4 = 4/8 h;
207         draw z1 -- z2 -- z3 -- z4;
208 fet_endchar
210 fet_beginchar("Mensural 8th rest","3mensural","mensfusarest")
211         set_char_box(0,mensrestsize#,0,mensrestsize#);
212         pickup pencircle
213                 xscaled pen_width
214                 yscaled pen_height
215                 rotated pen_rotation;
216         rt  x1 =      w;     y1 = 0;
217         rt  x2 =      w; top y2 = 5/8 h;
218         lft x3 =  1/5 w; bot y3 = 6/8 h;
219         lft x4 =      0; bot y4 = 4/8 h;
220         draw z1 -- z2 -- z3 -- z4;
221 fet_endchar
224 % FIXME: So far, I have never seen a semifusa rest printed.  Hence,
225 % the shape of this font character is currently pure invention.  --jr
227 fet_beginchar("Mensural 16th rest","4mensural","menssemifusarest")
228         set_char_box(0,mensrestsize#,0,staff_space#);
229         pickup pencircle
230                 xscaled pen_width
231                 yscaled pen_height
232                 rotated pen_rotation;
234         rt  x1 =      w;     y1 = 0;
235         rt  x2 =      w; top y2 = 5.5/8 h;
236         lft x3 =  1/5 w; bot y3 = 6.5/8 h;
237         lft x4 =      0; bot y4 = 4.5/8 h;
238         rt  x5 =      w; top y5 = 2.5/8 h;
239         lft x6 =  1/5 w; bot y6 = 3.5/8 h;
240         lft x7 =      0; bot y7 = 1.5/8 h;
241         draw z1 -- z2 -- z3 -- z4;
242         draw z5 -- z6 -- z7;
243 fet_endchar
245 fet_endgroup ("rests")