Nitpick: ly:spanner-bound grob name slur -> spanner.
[lilypond.git] / mf / feta-timesig.mf
blobffaa1883f99ed17bf4df7152fb32a5820c94ca32
2 % feta-timesig.mf --  implement Time Signatures
4 % source file of the Feta (not an abbreviation of Font-En-Tja) music font
6 % (c) 1998--2009 Mats Bengtsson <matsb@s3.kth.se>,
7 %                Christian Mondrup <scancm@biobase.dk>
9 fet_begingroup ("timesig");
13 % Originally by Mats B. nuked by Han-Wen, inspired by
14 % Baerenreiter BA320 (Bach Cello Suites, Suite III).
16 % Notes:
18 %  * The inside curve of the C is rather straight.
19 %  * The outside curve of the C is rather round.
20 %  * Right tips of the C point slightly outward.
21 %  * Lower tip protrudes to the right very slightly.
24 def draw_C =
25         save hair, bulb_rad, left_fatness;
26         save left_width, right_width;
27         save width, lower_offset;
29         width# := 1.8 staff_space# - stafflinethickness#;
31         left_width := 1.0 staff_space;
32         right_width := 0.8 staff_space;
34         hair := stafflinethickness;
36         bulb_rad := 0.40 staff_space - .6 stafflinethickness;
37         left_fatness := 0.55 * staff_space;
38         lower_offset := 0.3 stafflinethickness;
40         set_char_box (0, width#, staff_space#, staff_space#);
42         d := d - feta_shift;
44         x1r = w;
45         x3r = 0;
46         y1r = .45 h;
47         y2r = h + vround (.5 stafflinethickness_rounded);
48         y4r = -d - vround (.5 stafflinethickness_rounded);
49         x2 = x4;
50         x2 = x3r + h;
51         y3r = .5 (h - d);
53         x5r = x1r + lower_offset;
54         y5r = -0.37 h;
56         penpos1 (hair, 10);
57         penpos2 (stafflinethickness_rounded, 90);
58         penpos3 (left_fatness, 180);
59         penpos4 (stafflinethickness_rounded, -90);
60         penpos5 (hair, -13);
62         draw_bulb (-1, z1l, z1r, bulb_rad, .8);
64         save s;
65         s := 0.735;
67         fill z1l{dir (100)}
68              .. z2l{left}
69              ..tension 0.8.. z3l{down}
70              ..tension 0.8.. z4l{right}
71              .. simple_serif (z5l, z5r, -90)
72              .. z4r{left}
73              .. super_curvelet (z4r, z3r, s, -1)
74              .. z3r{up}
75              .. super_curvelet (z3r, z2r, s, 1)
76              .. z2r{right}
77              .. {dir (-80)}z1r
78              -- cycle;
80         penlabels (1, 2, 3, 4, 5);
82         draw_staff (-2, 2, 0);
83 enddef;
86 fet_beginchar ("4/4 meter", "C44");
87         draw_C;
88 fet_endchar;
91 fet_beginchar ("2/2 meter", "C22");
92         save eccentricity, top_stemlen, bottom_stemlen, thick, left_pos;
94         draw_C;
96         eccentricity = -1.75 stafflinethickness - 0.025 staff_space;
97         top_stemlen# = bottom_stemlen# = 1.4 staff_space#;
98         thick# = stafflinethickness# + 0.05 staff_space#;
99         define_whole_pixels (top_stemlen, bottom_stemlen);
100         define_whole_blacker_pixels (thick);
102         bottom_stemlen := bottom_stemlen - feta_shift;
104         draw_block ((x2 + eccentricity, -bottom_stemlen),
105                     (x2 + eccentricity + thick, top_stemlen));
106 fet_endchar;
108 fet_endgroup ("timesig");