1 % Feta (not the Font-En-Tja) music font -- implement Time Signatures
2 % This file is part of LilyPond, the GNU music typesetter.
4 % Copyright (C) 1998--2011 Mats Bengtsson <matsb@s3.kth.se>,
5 % Christian Mondrup <scancm@biobase.dk>
7 % LilyPond is free software: you can redistribute it and/or modify
8 % it under the terms of the GNU General Public License as published by
9 % the Free Software Foundation, either version 3 of the License, or
10 % (at your option) any later version.
12 % LilyPond is distributed in the hope that it will be useful,
13 % but WITHOUT ANY WARRANTY; without even the implied warranty of
14 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 % GNU General Public License for more details.
17 % You should have received a copy of the GNU General Public License
18 % along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 fet_begingroup ("timesig");
24 % Originally by Mats B. nuked by Han-Wen, inspired by
25 % Baerenreiter BA320 (Bach Cello Suites, Suite III).
29 % * The inside curve of the C is rather straight.
30 % * The outside curve of the C is rather round.
31 % * Right tips of the C point slightly outward.
32 % * Lower tip protrudes to the right very slightly.
36 save hair, bulb_rad, left_fatness;
37 save left_width, right_width;
38 save width, lower_offset;
40 width# := 1.8 staff_space# - stafflinethickness#;
42 left_width := 1.0 staff_space;
43 right_width := 0.8 staff_space;
45 hair := stafflinethickness;
47 bulb_rad := 0.40 staff_space - .6 stafflinethickness;
48 left_fatness := 0.55 * staff_space;
49 lower_offset := 0.3 stafflinethickness;
51 set_char_box (0, width#, staff_space#, staff_space#);
58 y2r = h + vround (.5 stafflinethickness_rounded);
59 y4r = -d - vround (.5 stafflinethickness_rounded);
64 x5r = x1r + lower_offset;
68 penpos2 (stafflinethickness_rounded, 90);
69 penpos3 (left_fatness, 180);
70 penpos4 (stafflinethickness_rounded, -90);
73 draw_bulb (-1, z1l, z1r, bulb_rad, .8);
80 ..tension 0.8.. z3l{down}
81 ..tension 0.8.. z4l{right}
82 .. simple_serif (z5l, z5r, -90)
84 .. super_curvelet (z4r, z3r, s, -1)
86 .. super_curvelet (z3r, z2r, s, 1)
91 penlabels (1, 2, 3, 4, 5);
93 draw_staff (-2, 2, 0);
97 fet_beginchar ("4/4 meter", "C44");
102 fet_beginchar ("2/2 meter", "C22");
103 save eccentricity, top_stemlen, bottom_stemlen, thick, left_pos;
107 eccentricity = -1.75 stafflinethickness - 0.025 staff_space;
108 top_stemlen# = bottom_stemlen# = 1.4 staff_space#;
109 thick# = stafflinethickness# + 0.05 staff_space#;
110 define_whole_pixels (top_stemlen, bottom_stemlen);
111 define_whole_blacker_pixels (thick);
113 bottom_stemlen := bottom_stemlen - feta_shift;
115 draw_block ((x2 + eccentricity, -bottom_stemlen),
116 (x2 + eccentricity + thick, top_stemlen));
119 fet_endgroup ("timesig");