%
% feta-timesig.mf -- implement Time Signatures
%
-% source file of the Feta (Font-En-Tja) music font
+% source file of the Feta (not an abbreviation of Font-En-Tja) music font
%
-% (c) 1998 Mats Bengtsson <matsb@s3.kth.se>
+% (c) 1998--2002 Mats Bengtsson <matsb@s3.kth.se>,
+% Christian Mondrup <scancm@biobase.dk>
fet_begingroup("timesig");
+def set_C_width =
+ save left_width, right_width;
+ left_width# := 1.0 staff_space#;
+ right_width# := 0.8 staff_space#;
+ define_pixels(left_width,right_width);
+enddef;
+
def draw_C =
- save hair, bulb_rad;
- hair# := .5 stafflinethickness#;
- bulb_rad# := (interline# - stafflinethickness#) / 4;
- define_pixels(hair, bulb_rad);
+ save hair, bulb_rad, left_fatness;
- x1r = x5;
- y1r = interline / 3;
- z2r = (0, interline);
- z3r = (-b, 0);
- z4r = (0, -interline);
- z5r = (w, -stafflinethickness);
+
+ hair# := stafflinethickness#;
+ bulb_rad# := 0.4 staff_space#;
+ define_pixels(hair, bulb_rad);
+ left_fatness = 0.55;
+
+ x1r = x5r;
+ y1r = .45 staff_space;
+ z2 = (0, staff_space);
+ z3r = (-left_width, 0);
+ z4 = (0, -staff_space);
+ z5r = (right_width - stafflinethickness, -0.4 staff_space);
- penpos1(1.5 stafflinethickness, 0);
+ penpos1(hair, 10);
penpos2(stafflinethickness, 90);
- penpos3(3 stafflinethickness, 180);
+ penpos3(left_fatness * staff_space, 180);
penpos4(stafflinethickness, -90);
penpos5(hair, -5);
+ z6l = z1l;
+ penpos6(hair, 0);
- draw_bulb(-1, z1l, z1r, bulb_rad, .8);
+ draw_bulb(-1, z6l, z6r, bulb_rad, .8);
- fill z1l{up} .. z2l{left} .. z3l{down} .. z4l{right} ..
+ fill z1l{dir (100)} .. z2l{left} .. z3l{down} .. z4l{right} ..
simple_serif(z5l, z5r, -90) ..
- z4r{left} .. z3r{up} .. z2r{right} .. z1r -- cycle;
+ z4r{left} .. z3r{up} .. z2r{right} .. {dir (-80)}z1r -- cycle;
-% labels(1,2,3,4,5);
- penlabels(1,2,3,4,5);
+ penlabels(1,2,3,4,5,6);
enddef;
-fet_beginchar ("4/4 meter", "C", "fourfourmeter")
- set_char_box(.8 interline#, .7 interline#, interline#, interline#);
-
+fet_beginchar ("4/4 meter", "C4/4", "fourfourmeter")
+ set_C_width;
+ set_char_box(left_width# + staff_space#, right_width# + staff_space#,
+ staff_space#, staff_space#);
+
draw_C;
fet_endchar;
-fet_beginchar ("4/4 meter", "C2", "allabreve")
- set_char_box(.8 interline#, .7 interline#, 1.4 interline#, 1.4 interline#);
+fet_beginchar ("2/2 meter", "C2/2", "allabreve")
+ set_C_width;
+ set_char_box(left_width# + staff_space#, right_width# + staff_space#,
+ 1.4 staff_space#, 1.4 staff_space#);
draw_C;
- draw_block((-stafflinethickness, -d), (0, h));
-fet_endchar;
-
+ save excentricity;
+ pair excentricity;
+ excentricity = (-1.25 stafflinethickness, 0);
+ draw_block((- .75 stafflinethickness, -d) + excentricity, (.75 stafflinethickness , h) + excentricity);
+fet_endchar;
fet_endgroup("timesig");