]> git.donarmstrong.com Git - lilypond.git/blob - mf/feta-timesig.mf
Prepare glyph shapes for mf2pt1 conversion.
[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--2004 Mats Bengtsson <matsb@s3.kth.se>,
7 %                Christian Mondrup <scancm@biobase.dk>
8
9 fet_begingroup ("timesig");
10
11
12 %
13 % Originally by Mats B. nuked by Han-Wen, inspired by
14 % Baerenreiter BA320 (Bach Cello Suites, Suite III).
15 %
16 % Notes:
17 %
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 protudes to the right very slightly.
22 %
23
24 def draw_C =
25         save hair, bulb_rad, left_fatness;
26         save left_width, right_width;
27         save width;
28
29         width# := 1.8 staff_space# - stafflinethickness#;
30         define_pixels (width);
31
32         left_width# := 1.0 staff_space#;
33         right_width# := 0.8 staff_space#;
34         define_pixels (left_width, right_width);
35
36         hair# := stafflinethickness#;
37         bulb_rad# := 0.4 staff_space#;
38         define_pixels (hair, bulb_rad);
39         left_fatness = 0.55;
40
41         x1r - x3r = width;
42         x3r = 0.0;
43         y1r = .45 staff_space;
44         y2 = -y4 = staff_space;
45         x2 = x4;
46         x2 = x3r + staff_space;
47         y3r = 0;
48
49         x5r = x1r + 0.3 stafflinethickness;
50         y5r = -0.37 staff_space;
51
52         penpos1 (hair, 10);
53         penpos2 (stafflinethickness, 90);
54         penpos3 (left_fatness * staff_space, 180);
55         penpos4 (stafflinethickness, -90);
56         penpos5 (hair, -13);
57
58         draw_bulb (-1, z1l,  z1r, bulb_rad, .8);
59
60         save s;
61         s := 0.735;
62
63         fill z1l{dir (100)}
64              .. z2l{left}
65              ..tension 0.8.. z3l{down}
66              ..tension 0.8.. z4l{right}
67              .. simple_serif (z5l, z5r, -90)
68              .. z4r{left}
69              .. super_curvelet (z4r, z3r, s, -1)
70              .. z3r{up}
71              .. super_curvelet (z3r, z2r, s, 1)
72              .. z2r{right}
73              .. {dir (-80)}z1r
74              -- cycle;
75
76         set_char_box (0, width#, staff_space#, staff_space#);
77
78         penlabels (1, 2, 3, 4, 5);
79 enddef;
80
81
82 fet_beginchar ("4/4 meter", "C44")
83         draw_C;
84 fet_endchar;
85
86
87 fet_beginchar ("2/2 meter", "C22")
88         save excentricity, stemlen, thick;
89         pair excentricity;
90
91         draw_C;
92
93         xpart excentricity = x2 - 1.25 stafflinethickness;
94         ypart excentricity = 0;
95
96         stemlen = 1.4 staff_space;
97         thick = stafflinethickness / 2 + 0.025 staff_space;
98
99         draw_block ((-thick, -stemlen) + excentricity,
100                     (thick, stemlen) + excentricity);
101 fet_endchar;
102
103 fet_endgroup ("timesig");