]> git.donarmstrong.com Git - lilypond.git/blob - mf/feta-timesig.mf
release: 1.5.29
[lilypond.git] / mf / feta-timesig.mf
1
2 % feta-timesig.mf --  implement Time Signatures
3
4 % source file of the Feta (not an abbreviation of Font-En-Tja) music font
5
6 % (c) 1998--2002 Mats Bengtsson <matsb@s3.kth.se>,
7 %                Christian Mondrup <scancm@biobase.dk>
8
9 fet_begingroup("timesig");
10
11 def set_C_width =
12         save left_width, right_width;
13         left_width# := 1.0 staff_space#;
14         right_width# := 0.8 staff_space#;
15         define_pixels(left_width,right_width);
16 enddef;
17
18 def draw_C =
19         save hair, bulb_rad, left_fatness;
20
21   
22         hair# := stafflinethickness#;
23         bulb_rad# := 0.4 staff_space#;
24         define_pixels(hair, bulb_rad);
25         left_fatness = 0.55;
26         
27         x1r = x5r;
28         y1r = .45 staff_space;
29         z2 = (0, staff_space);
30         z3r = (-left_width, 0);
31         z4 = (0, -staff_space);
32         z5r = (right_width - stafflinethickness, -0.4 staff_space);
33         
34         penpos1(hair, 10);
35         penpos2(stafflinethickness, 90);
36         penpos3(left_fatness * staff_space, 180);
37         penpos4(stafflinethickness, -90);
38         penpos5(hair, -5);
39         z6l = z1l;
40         penpos6(hair, 0);
41         
42         draw_bulb(-1, z6l,  z6r, bulb_rad, .8);
43
44         fill z1l{dir (100)} .. z2l{left} .. z3l{down} .. z4l{right} ..
45         simple_serif(z5l, z5r, -90) .. 
46         z4r{left} .. z3r{up} .. z2r{right} .. {dir (-80)}z1r -- cycle;
47         
48         penlabels(1,2,3,4,5,6);
49 enddef;
50
51 fet_beginchar ("4/4 meter", "C4/4", "fourfourmeter")
52         set_C_width;
53         set_char_box(left_width# + staff_space#, right_width# + staff_space#, 
54                 staff_space#, staff_space#);
55
56         draw_C;
57 fet_endchar;
58
59 fet_beginchar ("2/2 meter", "C2/2", "allabreve")
60         set_C_width;
61         set_char_box(left_width# + staff_space#, right_width# + staff_space#, 
62                 1.4 staff_space#, 1.4 staff_space#);
63         
64         draw_C;
65         save excentricity;
66         pair excentricity;
67         excentricity = (-1.25 stafflinethickness, 0);
68
69         draw_block((- .75 stafflinethickness, -d) + excentricity, (.75 stafflinethickness , h) + excentricity);
70 fet_endchar;
71
72 fet_endgroup("timesig");