1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-scripts.mf -- implement ancient script symbols
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 2002--2007 Juergen Reuter <reuter@ipd.uka.de>
9 fet_begingroup ("scripts");
11 fet_beginchar ("ictus", "ictus");
13 ht# = .35 staff_space#;
16 define_pixels (wd, ht);
22 T := identity xscaled wd
23 yscaled blot_diameter;
24 pickup pencircle transformed T;
25 ellipse := fullcircle transformed T;
27 set_char_box (wd# / 2, wd# / 2, ht# / 2, ht# / 2);
34 fill get_subpath (ellipse, up, down, z1)
35 -- get_subpath (ellipse, down, up, z2)
43 save thick, thin, ht, wd;
45 thin# = 1 linethickness#;
46 thick# = 1.2 linethickness#;
47 ht# = .35 staff_space#;
48 wd# = .25 staff_space#;
50 define_pixels (wd, ht, thin, thick);
52 z1 = z2 = (-wd / 2 + thin / 2, -ht / 2 + thin / 2);
53 z3 = z4 = (wd / 2 - thick / 2, ht / 2 - thick / 2);
55 penpos1 (thin, angle (z1 - z3));
56 penpos2 (thin, angle (z1 - z3) + 90);
57 penpos3 (thick, angle (z3 - z1) + 90);
58 penpos4 (thick, angle (z3 - z1));
68 set_char_box (wd#/2, wd#/2, ht#/2, ht#/2);
72 fet_beginchar ("accentus up", "uaccentus");
74 penlabels (1, 2, 3, 4);
78 fet_beginchar ("accentus down", "daccentus");
84 def draw_half_circle (expr diam) =
89 define_pixels (diameter);
91 thick = 0.6 linethickness;
95 penpos3 (thick, -180);
97 z1r = (diameter / 2, 0);
98 z2r = (0, -diameter / 2);
99 z3r = (-diameter / 2, 0);
107 fet_beginchar ("half circle", "usemicirculus");
108 draw_half_circle (5/16 staff_space#);
110 currentpicture := currentpicture yscaled -1;
112 set_char_box (diameter# / 2, diameter# / 2,
117 fet_beginchar ("half circle", "dsemicirculus");
118 draw_half_circle (5/16 staff_space#);
120 set_char_box (diameter# / 2, diameter# / 2,
127 fet_beginchar ("circle", "circulus");
128 save diameter, thick;
130 diameter# = 5/16 staff_space#;
132 define_pixels (diameter);
134 thick = 0.6 linethickness;
136 fill fullcircle scaled diameter;
137 unfill fullcircle scaled (diameter - 2 thick);
139 set_char_box (diameter# / 2, diameter# / 2,
140 diameter# / 2, diameter# / 2);
144 fet_beginchar ("augmentum", "augmentum");
147 diameter# = 0.25 staff_space#;
149 define_pixels (diameter);
151 pickup pencircle scaled diameter;
155 set_char_box (diameter# / 2, diameter# / 2,
156 diameter# / 2, diameter# / 2);
160 def draw_signum_congruentiae =
161 set_char_box (0.50 staff_space# + 1.5 linethickness#,
162 0.50 staff_space# + 1.5 linethickness#,
164 2.00 staff_space# + 3.5 linethickness#);
169 ellipse := fullcircle xscaled 1.0 linethickness
170 yscaled 5.0 linethickness
173 z1 = (+0.50 staff_space, +2.00 staff_space);
174 z2 = (+0.00 staff_space, +2.00 staff_space);
175 z3 = (-0.50 staff_space, +1.50 staff_space);
176 z4 = (-0.25 staff_space, +1.00 staff_space);
177 z5 = (+0.10 staff_space, +0.80 staff_space);
178 z6 = (+0.00 staff_space, +0.00 staff_space);
187 % we avoid cusps originally present in `draw pat'
188 fill get_subpath (ellipse,
189 -direction 0 of pat, direction 0 of pat, z1)
190 .. get_subpoint (ellipse, direction 1 of pat, z2)
192 .. get_subpoint (ellipse, direction 2 of pat, z3)
194 .. get_subpoint (ellipse, direction 3 of pat, z4)
196 .. get_subpoint (ellipse, direction 4 of pat, z5)
198 .. get_subpath (ellipse,
199 direction 4.8 of pat, -direction 5 of pat, z6)
200 .. get_subpoint (ellipse, -direction 4 of pat, z5)
201 {-direction 4 of pat}
202 .. get_subpoint (ellipse, -direction 3 of pat, z4)
203 {-direction 3 of pat}
204 .. get_subpoint (ellipse, -direction 2.5 of pat, point 2.5 of pat)
205 .. get_subpoint (ellipse, -direction 1 of pat, z2)
206 {-direction 1 of pat}
209 pickup pencircle scaled 3.0 linethickness;
211 z7 = (-0.5 staff_space, +0.0 staff_space);
212 z8 = (+0.5 staff_space, +0.0 staff_space);
219 fet_beginchar ("signum congruentiae up", "usignumcongruentiae");
220 draw_signum_congruentiae;
221 labels (1, 2, 3, 4, 5, 6, 7, 8);
225 fet_beginchar ("signum congruentiae down", "dsignumcongruentiae");
226 draw_signum_congruentiae;
231 fet_endgroup ("scripts");