2 % parmesan-custodes.mf -- implement ancient custodes
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 2000--2002 Juergen Reuter <reuter@ipd.uka.de>
9 save black_notehead_width;
10 numeric black_notehead_width;
12 fet_begingroup ("custodes")
14 noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
15 define_pixels(noteheight);
17 save between_staff_lines, on_staff_line, anywhere;
18 between_staff_lines = 0;
22 save dir_up, dir_down;
34 % parameterized hufnagel custos
35 def custos_hufnagel(expr verbose_name, internal_name, mudela_name,
36 direction, staffline_adjustment) =
38 fet_beginchar(verbose_name, internal_name, mudela_name)
41 a_b := 1.54; % b_h * a_b / a_w = wd / ht
50 set_char_box(0, wd#, ht# / 2, ht# / 2);
51 black_notehead_width# := wd#;
53 save rh_width, rh_height, rh_edge; % rhombus dimensions
54 rh_width# / ht# = tand(35);
56 rh_edge# * cosd(35) = ht# / 2;
59 if staffline_adjustment = between_staff_lines:
61 elseif staffline_adjustment = on_staff_line:
63 else: % staffline_adjustment = anywhere
67 define_pixels(rh_width, rh_height, rh_edge);
69 xscaled stafflinethickness
71 rotated (-35*direction);
72 z1=(0.5rh_width,+0.25direction*rh_height);
73 z2=(1.0rh_width,-0.25direction*rh_height);
74 z3-z2=(stem_size*rh_width,+0.75*stem_size*direction*rh_height);
80 % custos hufnagel, stem up, between staff lines
81 custos_hufnagel("Custos Hufnagel", "hufnagel-u0", "hufnagel_u0",
82 dir_up, between_staff_lines);
84 % custos hufnagel, stem up, on staff line
85 custos_hufnagel("Custos Hufnagel", "hufnagel-u1", "hufnagel_u1",
86 dir_up, on_staff_line);
88 % custos hufnagel, stem up, anywhere
89 custos_hufnagel("Custos Hufnagel", "hufnagel-u2", "hufnagel_u2",
92 % custos hufnagel, stem down, between staff lines
93 custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d0", "hufnagel_d0",
94 dir_down, between_staff_lines);
96 % custos hufnagel, stem down, on staff line
97 custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d1", "hufnagel_d1",
98 dir_down, on_staff_line);
100 % custos hufnagel, stem down, anywhere
101 custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d2", "hufnagel_d2",
111 def custos_medicaea(expr verbose_name, internal_name, mudela_name,
112 direction, staffline_adjustment) =
114 fet_beginchar(verbose_name, internal_name, mudela_name)
117 a_b := 1.54; % b_h * a_b / a_w = wd / ht
121 save a, beta, ht, wd;
122 ht# = noteheight#; %% * mag;
125 wd# = 0.4a# / a_w; % width intentionally too small
126 set_char_box(0, wd#, ht# / 2, ht# / 2);
127 black_notehead_width# := wd#;
129 define_pixels(ht, wd);
132 if staffline_adjustment = between_staff_lines:
134 elseif staffline_adjustment = on_staff_line:
136 else: % staffline_adjustment = anywhere
140 pickup pencircle xscaled blot_diameter yscaled 1.0ht;
142 z2 = z1 + (1.0wd - blot_diameter/2, 0);
145 pickup pencircle scaled stafflinethickness;
146 z3 = (1.0wd - stafflinethickness/2, 0.0ht);
147 z4 = z3 + (0, +direction*stem_size*ht);
153 % custos medicaea, stem up, between staff lines
154 custos_medicaea("Custos Med.", "medicaea-u0", "medicaea_u0",
155 dir_up, between_staff_lines);
157 % custos medicaea, stem up, on staff line
158 custos_medicaea("Custos Med.", "medicaea-u1", "medicaea_u1",
159 dir_up, on_staff_line);
161 % custos medicaea, stem up, anywhere
162 custos_medicaea("Custos Med.", "medicaea-u2", "medicaea_u2",
165 % custos medicaea, stem down, between staff lines
166 custos_medicaea("Reverse Custos Med.", "medicaea-d0", "medicaea_d0",
167 dir_down, between_staff_lines);
169 % custos medicaea, stem down, on staff line
170 custos_medicaea("Reverse Custos Med.", "medicaea-d1", "medicaea_d1",
171 dir_down, on_staff_line);
173 % custos medicaea, stem down, anywhere
174 custos_medicaea("Reverse Custos Med.", "medicaea-d2", "medicaea_d2",
180 % Editio Vaticana style
184 def custos_vaticana(expr verbose_name, internal_name, mudela_name,
185 direction, staffline_adjustment) =
187 fet_beginchar(verbose_name, internal_name, mudela_name)
190 a_b := 1.54; % b_h * a_b / a_w = wd / ht
194 save a, beta, ht, wd;
195 ht# = noteheight# ; %% * mag;
199 set_char_box(0, wd#, ht# / 2, ht# / 2);
200 black_notehead_width# := wd#;
203 if staffline_adjustment = between_staff_lines:
205 elseif staffline_adjustment = on_staff_line:
207 else: % staffline_adjustment = anywhere
211 define_pixels(ht, wd);
212 pickup pencircle scaled stafflinethickness;
214 z1 = (0.0wd, +direction*0.05ht);
215 z2 = (1.0wd + 0.5stafflinethickness, 0.0ht);
218 penstroke z1e{z2 - z1} .. {right}z2e;
221 z4=(1.0wd, +direction*stem_size*ht);
227 % custos vaticana, stem up, between staff lines
228 custos_vaticana("Custos Ed. Vat.", "vaticana-u0", "vaticana_u0",
229 dir_up, between_staff_lines);
231 % custos vaticana, stem up, on staff line
232 custos_vaticana("Custos Ed. Vat.", "vaticana-u1", "vaticana_u1",
233 dir_up, on_staff_line);
235 % custos vaticana, stem up, anywhere
236 custos_vaticana("Custos Ed. Vat.", "vaticana-u2", "vaticana_u2",
239 % custos vaticana, stem down, between staff lines
240 custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d0", "vaticana_d0",
241 dir_down, between_staff_lines);
243 % custos vaticana, stem down, on_staff_line
244 custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d1", "vaticana_d1",
245 dir_down, on_staff_line);
247 % custos vaticana, stem down, anywhere
248 custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d2", "vaticana_d2",
258 def custos_mensural(expr verbose_name, internal_name, mudela_name,
259 direction, staffline_adjustment) =
261 fet_beginchar(verbose_name, internal_name, mudela_name)
264 a_b:=1.54; % b_h * a_b / a_w = wd / ht
268 save a, beta, ht, wd;
272 wd# = 2a# / a_w; % width intentionally too small
273 set_char_box(0, wd#, ht# / 2, ht# / 2);
274 black_notehead_width# := wd#;
277 if staffline_adjustment = between_staff_lines:
279 elseif staffline_adjustment = on_staff_line:
281 else: % staffline_adjustment = anywhere
285 define_pixels(ht, wd);
287 xscaled stafflinethickness
289 rotated (-35*direction);
290 z1=(0.0wd,-direction*0.2ht);
291 z2=(0.2wd,+direction*0.2ht);
292 z3=(0.4wd,-direction*0.2ht);
293 z4=(0.6wd,+direction*0.2ht);
294 z5=(0.8wd,-direction*0.2ht);
295 z6-z5=(stem_size*0.5wd,+direction*stem_size*ht);
296 draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
301 % custos mensural, stem up, between staff lines
302 custos_mensural("Custos Mensural", "mensural-u0", "mensural_u0",
303 dir_up, between_staff_lines);
305 % custos mensural, stem up, on staff line
306 custos_mensural("Custos Mensural", "mensural-u1", "mensural_u1",
307 dir_up, on_staff_line);
309 % custos mensural, stem up, anywhere
310 custos_mensural("Custos Mensural", "mensural-u2", "mensural_u2",
313 % custos mensural, stem down, between staff lines
314 custos_mensural("Reverse Custos Mensural", "mensural-d0", "mensural_d0",
315 dir_down, between_staff_lines);
317 % custos mensural, stem down, on staff line
318 custos_mensural("Reverse Custos Mensural", "mensural-d1", "mensural_d1",
319 dir_down, on_staff_line);
321 % custos mensural, stem down, anywhere
322 custos_mensural("Reverse Custos Mensural", "mensural-d2", "mensural_d2",
325 fet_endgroup ("custodes")