+% Feta (not the Font-En-Tja) music font -- ancient rests
+% This file is part of LilyPond, the GNU music typesetter.
+%
+% Copyright (C) 2001--2011 Juergen Reuter <reuter@ipd.uka.de>
%
-% feta-toevallig.mf -- implement Accidentals
-%
-% source file of the Feta (Font-En-Tja) music font
-%
-% (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% Neo-mensural rests originally by
+% Christian Mondrup and Mats Bengtsson.
%
+%
+% LilyPond is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% LilyPond is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-fet_begingroup("accidentals");
-
+fet_begingroup ("rests")
%%%%%%%%
%
%
%
-% EDITIO MEDICAEA
+% NEO-MENSURAL NOTATION
%
%
%
-fet_beginchar("Ed. Med. Flat" , "medicaea-1", "medicaeaflat");
- set_char_box(0, 0.8 staff_space#, 0.6 staff_space#,
- 2.0 staff_space#);
- pickup pencircle
- xscaled 0.50 stafflinethickness
- yscaled 0.22 staff_space;
+% Neo-mensural longa and breve are identical with default longa and breve.
+
+neomens_block_rest_x# = 2/5 staff_space#;
+neomens_block_rest_y# = 1/1 staff_space#;
+neomens_half_block_rest_y# = 5/8 staff_space#;
+
+define_pixels (neomens_block_rest_x,
+ neomens_block_rest_y,
+ neomens_half_block_rest_y);
+
+
+def neomens_half_block_rest =
+ draw_block ((0, 0),
+ (neomens_block_rest_x, neomens_half_block_rest_y));
+enddef;
+
+
+fet_beginchar ("Neo-mensural maxima rest", "M3neomensural");
+ set_char_box (0, 3 neomens_block_rest_x#,
+ neomens_block_rest_y#, neomens_block_rest_y#);
+
+ draw_block ((0, -neomens_block_rest_y),
+ (neomens_block_rest_x, neomens_block_rest_y));
+ addto currentpicture also currentpicture
+ shifted (2 neomens_block_rest_x, 0);
+fet_endchar;
+
+
+fet_beginchar ("Neo-mensural longa rest", "M2neomensural");
+ set_char_box (0, neomens_block_rest_x#,
+ neomens_block_rest_y#, neomens_block_rest_y#);
+
+ draw_block ((0, -neomens_block_rest_y),
+ (neomens_block_rest_x, neomens_block_rest_y));
+fet_endchar;
+
+
+fet_beginchar ("Neo-mensural breve rest", "M1neomensural");
+ set_char_box (0, neomens_block_rest_x#,
+ 0, neomens_block_rest_y#);
+
+ draw_block ((0, 0),
+ (neomens_block_rest_x, neomens_block_rest_y));
+fet_endchar;
+
+
+fet_beginchar ("Neo-mensural whole rest", "0neomensural");
+ set_char_box (0, neomens_block_rest_x#,
+ neomens_half_block_rest_y#, 0);
+
+ neomens_half_block_rest;
+ currentpicture :=
+ currentpicture shifted (0, -neomens_half_block_rest_y);
+fet_endchar;
+
+
+fet_beginchar ("Neo-mensural half rest", "1neomensural");
+ set_char_box (0, neomens_block_rest_x#,
+ 0, neomens_half_block_rest_y#);
+
+ neomens_half_block_rest;
+fet_endchar;
+
+
+neomensrestsize# = 0.8 staff_space#;
+
+
+fet_beginchar ("Neo-mensural 4th rest", "2neomensural");
+ set_char_box (0, neomensrestsize#,
+ 0, neomensrestsize#);
+
+ pickup pencircle scaled 2 stafflinethickness;
+
+ lft x1 = 0;
+ bot y1 = 0;
+ lft x2 = lft x3 = 0;
+ top y2 = top y3 = h;
+ rt x4 = w;
+ bot y4 = h / 2;
+
+ z11 = z1 - stafflinethickness * unitvector (z2 - z1);
+ z14 = z4 + stafflinethickness * unitvector (z4 - z3);
+
+ penpos1 (2 stafflinethickness, 0);
+ penpos2 (2 stafflinethickness, 0);
+ penpos3 (2 stafflinethickness, angle (z4 - z3) - 90);
+ penpos4 (2 stafflinethickness, angle (z4 - z3) - 90);
+
+ fill z1l
+ -- z2l
+ -- z2r
+ -- z1r
+ .. z11
+ .. z1l
+ .. cycle;
+ fill z3l
+ -- z4l
+ .. z14
+ .. z4r
+ -- z3r
+ .. z2l{up}
+ .. z3l
+ .. cycle;
+
+ penlabels (1, 2, 3, 4);
+ labels (11, 14);
+fet_endchar;
+
+
+fet_beginchar ("Neo-mensural 8th rest", "3neomensural");
+ set_char_box (0, neomensrestsize#,
+ 0, neomensrestsize#);
+
+ pickup pencircle scaled 2 stafflinethickness;
+
+ rt x1 = w;
+ bot y1 = 0;
+ rt x2 = rt x3 = w;
+ top y2 = top y3 = h;
+ lft x4 = 0;
+ bot y4 = h / 2;
+
+ z11 = z1 - stafflinethickness * unitvector (z2 - z1);
+ z14 = z4 + stafflinethickness * unitvector (z4 - z3);
+
+ penpos1 (2 stafflinethickness, 0);
+ penpos2 (2 stafflinethickness, 0);
+ penpos3 (2 stafflinethickness, angle (z4 - z3) - 90);
+ penpos4 (2 stafflinethickness, angle (z4 - z3) - 90);
+
+ fill z1l
+ -- z2l
+ -- z2r
+ -- z1r
+ .. z11
+ .. z1l
+ .. cycle;
+ fill z3l
+ -- z4l
+ .. z14
+ .. z4r
+ -- z3r
+ .. z2r{down}
+ .. z3l
+ .. cycle;
- save za, zb;
- pair za, zb;
+ penlabels (1, 2, 3, 4);
+ labels (11, 14);
+fet_endchar;
- za = (0.00 staff_space, +0.90 staff_space);
- zb = (0.00 staff_space, -0.50 staff_space);
- draw za -- zb;
- pickup pencircle
- xscaled 0.50 stafflinethickness
- yscaled 0.22 staff_space
- rotated -63;
+fet_beginchar ("Neo-mensural 16th rest", "4neomensural");
+ set_char_box (0, neomensrestsize#,
+ 0, staff_space#);
- save zc, zd, ze;
- pair zc, zd, ze;
+ pickup pencircle scaled 2 stafflinethickness;
- zc = (0.10 staff_space, -0.50 staff_space);
- zd = (0.40 staff_space, +0.40 staff_space);
- ze = (0.10 staff_space, +0.40 staff_space);
+ rt x1 = w;
+ bot y1 = 0;
+ rt x2 = w;
+ top y2 = h;
- draw zc{(1,2)} .. zd .. ze{(-1,-1)};
+ rt x3 = w;
+ top y3 = h;
+ lft x4 = 0;
+ bot y4 = h / 2;
+ rt x5 = w;
+ top y5 = 5/8 h;
+ lft x6 = 0;
+ bot y6 = h / 8;
+
+ z11 = z1 - stafflinethickness * unitvector (z2 - z1);
+ z14 = z4 + stafflinethickness * unitvector (z4 - z3);
+ z16 = z6 + stafflinethickness * unitvector (z6 - z5);
+
+ penpos1 (2 stafflinethickness, 0);
+ penpos2 (2 stafflinethickness, 0);
+ penpos3 (2 stafflinethickness, angle (z4 - z3) - 90);
+ penpos4 (2 stafflinethickness, angle (z4 - z3) - 90);
+ penpos5 (2 stafflinethickness, angle (z6 - z5) - 90);
+ penpos6 (2 stafflinethickness, angle (z6 - z5) - 90);
+
+ fill z1l
+ -- z2l
+ -- z2r
+ -- z1r
+ .. z11
+ .. z1l
+ .. cycle;
+ fill z3l
+ -- z4l
+ .. z14
+ .. z4r
+ -- z3r
+ .. z2r{down}
+ .. z3l
+ .. cycle;
+ fill z5l
+ -- z6l
+ .. z16
+ .. z6r
+ -- z5r
+ -- z5l
+ -- cycle;
+
+ penlabels (1, 2, 3, 4, 5, 6);
+ labels (11, 14, 16);
+fet_endchar;
- fet_endchar;
%%%%%%%%
%
%
%
-% EDITIO VATICANA
+% MENSURAL NOTATION
%
%
%
-fet_beginchar("Ed. Vat. Flat" , "vaticana-1", "vaticanaflat");
- set_char_box(0, 0.7 staff_space#, 0.6 staff_space#,
- 2.0 staff_space#);
- define_pixels (stafflinethickness, staff_space);
- save za, zb, zc, zd, ze, zf, zg;
- pair za, zb, zc, zd, ze, zf, zg;
- za = (0.00 staff_space, +0.80 staff_space);
- zb = (0.00 staff_space, -0.03 staff_space);
- zc = (0.25 staff_space, -0.23 staff_space);
- zd = (0.50 staff_space, -0.23 staff_space);
- ze = (0.50 staff_space, +0.00 staff_space);
- zf = (0.25 staff_space, +0.20 staff_space);
- zg = (0.15 staff_space, +0.26 staff_space);
+pen_width# = 0.3 staff_space#;
+pen_height# = 0;
+pen_rotation = 30;
+slight_pen_rotation = 15;
- pickup pencircle
- xscaled 0.50 stafflinethickness
- yscaled 0.22 staff_space;
- draw za{down} .. {down}zb .. zc .. zd{up} .. {up}ze .. zf .. zg;
- fet_endchar;
+mens_block_rest_y# = 1/1 staff_space#;
+mens_half_block_rest_y# = 5/8 staff_space#;
-fet_beginchar("Ed. Vat. Natural" , "vaticana0", "vaticananatural");
- set_char_box(0, 0.6 staff_space#, 0.6 staff_space#,
- 2.0 staff_space#);
- define_pixels (stafflinethickness, staff_space);
+define_pixels (mens_block_rest_y, mens_half_block_rest_y,
+ pen_width, pen_height);
- save za, zb, zc, zd;
- pair za, zb, zc, zd;
- pickup pencircle
- xscaled 0.80 stafflinethickness
- yscaled 0.22 staff_space;
- za = (0.00 staff_space, +0.65 staff_space);
- zb = (0.00 staff_space, -0.35 staff_space);
- zc = (0.00 staff_space, -0.30 staff_space);
- zd = (0.40 staff_space, -0.08 staff_space);
- draw za -- zb;
- draw zc -- zd;
- addto currentpicture also currentpicture
- xscaled -1
- yscaled -1
- shifted (0.40 staff_space, 0.0 staff_space);
+fet_beginchar ("Mensural maxima rest", "M3mensural");
+ set_char_box (0, pen_width#,
+ mens_block_rest_y#, 2 mens_block_rest_y#);
- fet_endchar;
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated slight_pen_rotation;
+
+ draw (w / 2, -mens_block_rest_y)
+ -- (w / 2, 2 mens_block_rest_y);
+fet_endchar;
+
+
+fet_beginchar ("Mensural longa rest", "M2mensural");
+ set_char_box (0, pen_width#,
+ mens_block_rest_y#, mens_block_rest_y#);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated slight_pen_rotation;
+
+ draw (w / 2, -mens_block_rest_y)
+ -- (w / 2, mens_block_rest_y);
+fet_endchar;
+
+
+fet_beginchar ("Mensural breve rest", "M1mensural");
+ set_char_box (0, pen_width#,
+ 0, mens_block_rest_y#);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated slight_pen_rotation;
+
+ draw (w / 2, 0)
+ -- (w / 2, mens_block_rest_y);
+fet_endchar;
+
+
+fet_beginchar ("Mensural whole rest", "0mensural");
+ set_char_box (0, pen_width#,
+ mens_half_block_rest_y#, 0);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated slight_pen_rotation;
+
+ draw (w / 2, 0)
+ -- (w / 2, -mens_half_block_rest_y);
+fet_endchar;
+
+
+fet_beginchar ("Mensural half rest", "1mensural");
+ set_char_box (0, pen_width#,
+ 0, mens_half_block_rest_y#);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated slight_pen_rotation;
+
+ draw (w / 2, 0)
+ -- (w / 2, mens_half_block_rest_y);
+fet_endchar;
+
+
+mensrestsize# = .8 staff_space#;
+
+
+fet_beginchar ("Mensural 4th rest", "2mensural");
+ set_char_box (0, mensrestsize#,
+ 0, mensrestsize#);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated pen_rotation;
+
+ lft x1 = 0;
+ y1 = 0;
+ lft x2 = 0;
+ top y2 = 5/8 h;
+ rt x3 = 1/5 w;
+ bot y3 = 6/8 h;
+ rt x4 = w;
+ bot y4 = 4/8 h;
+
+ draw z1
+ -- z2
+ -- z3
+ -- z4;
+
+ labels (1, 2, 3, 4);
+fet_endchar;
-%%%%%%%%
%
+% FIXME: The left sharp corner produces ugly results at lower resolutions.
%
+fet_beginchar ("Mensural 8th rest", "3mensural");
+ set_char_box (0, mensrestsize#,
+ 0, mensrestsize#);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated pen_rotation;
+
+ rt x1 = w;
+ y1 = 0;
+ rt x2 = w;
+ top y2 = 5/8 h;
+ lft x3 = 1/5 w;
+ bot y3 = 6/8 h;
+ lft x4 = 0;
+ bot y4 = 4/8 h;
+
+ draw z1
+ -- z2
+ -- z3
+ -- z4;
+
+ labels (1, 2, 3, 4);
+fet_endchar;
+
%
-% MENSURAL NOTATION
+% FIXME: So far, I have never seen a semifusa rest printed. Hence,
+% the shape of this font character is currently pure invention. --jr
%
%
+% FIXME: The left sharp corner produces ugly results at lower resolutions.
%
-fet_beginchar("Mensural Sharp" , "mensural1", "mensuralsharp");
- set_char_box(0.4 staff_space#, 0.6 staff_space#, 0.5 staff_space#,
- 0.5 staff_space#);
- save stemthick;
- define_pixels (stemthick, staff_space);
- stemthick# = stafflinethickness#;
-
- save za, zb;
- pair za, zb;
- pickup pencircle scaled 0.8 stemthick;
- za = 0.4 * staff_space * (0.8, 1);
- za = -zb;
- draw za .. zb;
-
- addto currentpicture also currentpicture xscaled -1;
- addto currentpicture also currentpicture shifted (0.20 staff_space, 0);
-
- fet_endchar;
-
-fet_beginchar("Mensural Flat" , "mensural-1", "mensuralflat");
- set_char_box(0.1 staff_space#, 0.7 staff_space#, 0.4 staff_space#,
- 1.8 staff_space#);
- save stemthick;
- define_pixels (stemthick, staff_space);
- stemthick# = stafflinethickness#;
-
- save za, zb, zc, zd, ze;
- pair za, zb, zc, zd, ze;
- pickup pencircle
- xscaled 1.4 stemthick
- yscaled 0.6 stemthick
- rotated 45;
-
- za = (0.00 staff_space, +1.80 staff_space);
- zb = (0.00 staff_space, -0.25 staff_space);
- zc = (0.35 staff_space, -0.25 staff_space);
- zd = (0.35 staff_space, +0.25 staff_space);
- ze = (0.00 staff_space, +0.25 staff_space);
- draw za -- zb .. zc .. zd .. ze;
- fet_endchar;
-
-fet_beginchar("Hufnagel Flat" , "hufnagel-1", "hufnagelflat");
- set_char_box(0.5 staff_space#, 0.7 staff_space#, 0.4 staff_space#,
- 1.8 staff_space#);
- save stemthick;
- define_pixels (stemthick, staff_space);
- stemthick# = stafflinethickness#;
-
- save za, zb, zc, zd, ze, zf;
- pair za, zb, zc, zd, ze, zf;
- pickup pencircle
- xscaled 2.4 stemthick
- yscaled 0.4 stemthick
- rotated 45;
-
- za = (0.00 staff_space, +1.80 staff_space);
- zb = (0.00 staff_space, -0.15 staff_space);
- zc = (0.25 staff_space, -0.30 staff_space);
- zd = (0.50 staff_space, +0.00 staff_space);
- ze = (0.30 staff_space, +0.30 staff_space);
- zf = (0.00 staff_space, +0.15 staff_space);
- draw za -- zb -- zc .. zd .. ze -- zf;
- fet_endchar;
-
-fet_endgroup ("accidentals")
+fet_beginchar ("Mensural 16th rest", "4mensural");
+ set_char_box (0, mensrestsize#,
+ 0, staff_space#);
+
+ pickup pencircle xscaled pen_width
+ yscaled pen_height
+ rotated pen_rotation;
+
+ rt x1 = w;
+ y1 = 0;
+ rt x2 = w;
+ top y2 = 5.5/8 h;
+ lft x3 = 1/5 w;
+ bot y3 = 6.5/8 h;
+ lft x4 = 0;
+ bot y4 = 4.5/8 h;
+ rt x5 = w;
+ top y5 = 2.5/8 h;
+ lft x6 = 1/5 w;
+ bot y6 = 3.5/8 h;
+ lft x7 = 0;
+ bot y7 = 1.5/8 h;
+
+ draw z1
+ -- z2
+ -- z3
+ -- z4;
+ draw z5
+ -- z6
+ -- z7;
+
+ labels (1, 2, 3, 4, 5, 6, 7);
+fet_endchar;
+
+
+fet_endgroup ("rests")