1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-rests.mf -- implement ancient rests
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 2001--2007 Juergen Reuter <reuter@ipd.uka.de>
8 % Neo-mensural rests originally by
9 % Christian Mondrup and Mats Bengtsson.
12 fet_begingroup ("rests")
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,
32 neomens_half_block_rest_y);
35 def neomens_half_block_rest =
37 (neomens_block_rest_x, neomens_half_block_rest_y));
41 fet_beginchar ("Neo-mensural maxima rest", "M3neomensural");
42 set_char_box (0, 3 neomens_block_rest_x#,
43 neomens_block_rest_y#, neomens_block_rest_y#);
45 draw_block ((0, -neomens_block_rest_y),
46 (neomens_block_rest_x, neomens_block_rest_y));
47 addto currentpicture also currentpicture
48 shifted (2 neomens_block_rest_x, 0);
52 fet_beginchar ("Neo-mensural longa rest", "M2neomensural");
53 set_char_box (0, neomens_block_rest_x#,
54 neomens_block_rest_y#, neomens_block_rest_y#);
56 draw_block ((0, -neomens_block_rest_y),
57 (neomens_block_rest_x, neomens_block_rest_y));
61 fet_beginchar ("Neo-mensural breve rest", "M1neomensural");
62 set_char_box (0, neomens_block_rest_x#,
63 0, neomens_block_rest_y#);
66 (neomens_block_rest_x, neomens_block_rest_y));
70 fet_beginchar ("Neo-mensural whole rest", "0neomensural");
71 set_char_box (0, neomens_block_rest_x#,
72 neomens_half_block_rest_y#, 0);
74 neomens_half_block_rest;
76 currentpicture shifted (0, -neomens_half_block_rest_y);
80 fet_beginchar ("Neo-mensural half rest", "1neomensural");
81 set_char_box (0, neomens_block_rest_x#,
82 0, neomens_half_block_rest_y#);
84 neomens_half_block_rest;
88 neomensrestsize# = 0.8 staff_space#;
91 fet_beginchar ("Neo-mensural 4th rest", "2neomensural");
92 set_char_box (0, neomensrestsize#,
95 pickup pencircle scaled 2 stafflinethickness;
104 z11 = z1 - stafflinethickness * unitvector (z2 - z1);
105 z14 = z4 + stafflinethickness * unitvector (z4 - z3);
107 penpos1 (2 stafflinethickness, 0);
108 penpos2 (2 stafflinethickness, 0);
109 penpos3 (2 stafflinethickness, angle (z4 - z3) - 90);
110 penpos4 (2 stafflinethickness, angle (z4 - z3) - 90);
128 penlabels (1, 2, 3, 4);
133 fet_beginchar ("Neo-mensural 8th rest", "3neomensural");
134 set_char_box (0, neomensrestsize#,
135 0, neomensrestsize#);
137 pickup pencircle scaled 2 stafflinethickness;
146 z11 = z1 - stafflinethickness * unitvector (z2 - z1);
147 z14 = z4 + stafflinethickness * unitvector (z4 - z3);
149 penpos1 (2 stafflinethickness, 0);
150 penpos2 (2 stafflinethickness, 0);
151 penpos3 (2 stafflinethickness, angle (z4 - z3) - 90);
152 penpos4 (2 stafflinethickness, angle (z4 - z3) - 90);
170 penlabels (1, 2, 3, 4);
175 fet_beginchar ("Neo-mensural 16th rest", "4neomensural");
176 set_char_box (0, neomensrestsize#,
179 pickup pencircle scaled 2 stafflinethickness;
195 z11 = z1 - stafflinethickness * unitvector (z2 - z1);
196 z14 = z4 + stafflinethickness * unitvector (z4 - z3);
197 z16 = z6 + stafflinethickness * unitvector (z6 - z5);
199 penpos1 (2 stafflinethickness, 0);
200 penpos2 (2 stafflinethickness, 0);
201 penpos3 (2 stafflinethickness, angle (z4 - z3) - 90);
202 penpos4 (2 stafflinethickness, angle (z4 - z3) - 90);
203 penpos5 (2 stafflinethickness, angle (z6 - z5) - 90);
204 penpos6 (2 stafflinethickness, angle (z6 - z5) - 90);
229 penlabels (1, 2, 3, 4, 5, 6);
243 pen_width# = 0.3 staff_space#;
246 slight_pen_rotation = 15;
248 mens_block_rest_y# = 1/1 staff_space#;
249 mens_half_block_rest_y# = 5/8 staff_space#;
251 define_pixels (mens_block_rest_y, mens_half_block_rest_y,
252 pen_width, pen_height);
255 fet_beginchar ("Mensural maxima rest", "M3mensural");
256 set_char_box (0, pen_width#,
257 mens_block_rest_y#, 2 mens_block_rest_y#);
259 pickup pencircle xscaled pen_width
261 rotated slight_pen_rotation;
263 draw (w / 2, -mens_block_rest_y)
264 -- (w / 2, 2 mens_block_rest_y);
268 fet_beginchar ("Mensural longa rest", "M2mensural");
269 set_char_box (0, pen_width#,
270 mens_block_rest_y#, mens_block_rest_y#);
272 pickup pencircle xscaled pen_width
274 rotated slight_pen_rotation;
276 draw (w / 2, -mens_block_rest_y)
277 -- (w / 2, mens_block_rest_y);
281 fet_beginchar ("Mensural breve rest", "M1mensural");
282 set_char_box (0, pen_width#,
283 0, mens_block_rest_y#);
285 pickup pencircle xscaled pen_width
287 rotated slight_pen_rotation;
290 -- (w / 2, mens_block_rest_y);
294 fet_beginchar ("Mensural whole rest", "0mensural");
295 set_char_box (0, pen_width#,
296 mens_half_block_rest_y#, 0);
298 pickup pencircle xscaled pen_width
300 rotated slight_pen_rotation;
303 -- (w / 2, -mens_half_block_rest_y);
307 fet_beginchar ("Mensural half rest", "1mensural");
308 set_char_box (0, pen_width#,
309 0, mens_half_block_rest_y#);
311 pickup pencircle xscaled pen_width
313 rotated slight_pen_rotation;
316 -- (w / 2, mens_half_block_rest_y);
320 mensrestsize# = .8 staff_space#;
323 fet_beginchar ("Mensural 4th rest", "2mensural");
324 set_char_box (0, mensrestsize#,
327 pickup pencircle xscaled pen_width
329 rotated pen_rotation;
349 % FIXME: The left sharp corner produces ugly results at lower resolutions.
351 fet_beginchar ("Mensural 8th rest", "3mensural");
352 set_char_box (0, mensrestsize#,
355 pickup pencircle xscaled pen_width
357 rotated pen_rotation;
377 % FIXME: So far, I have never seen a semifusa rest printed. Hence,
378 % the shape of this font character is currently pure invention. --jr
381 % FIXME: The left sharp corner produces ugly results at lower resolutions.
383 fet_beginchar ("Mensural 16th rest", "4mensural");
384 set_char_box (0, mensrestsize#,
387 pickup pencircle xscaled pen_width
389 rotated pen_rotation;
414 labels (1, 2, 3, 4, 5, 6, 7);
418 fet_endgroup ("rests")