2 % parmesan-custodes.mf -- implement ancient custodes
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 2000--2003 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, ly_name,
36 direction, staffline_adjustment) =
38 fet_beginchar(verbose_name, internal_name, ly_name)
41 a_b := 1.54; % b_h * a_b / a_w = wd / ht
50 black_notehead_width# := wd#;
52 save rh_width, rh_height, rh_edge; % rhombus dimensions
53 rh_width# / ht# = tand(35);
55 rh_edge# * cosd(35) = ht# / 2;
58 if staffline_adjustment = between_staff_lines:
60 elseif staffline_adjustment = on_staff_line:
62 else: % staffline_adjustment = anywhere
66 define_pixels(rh_width, rh_height, rh_edge);
68 xscaled stafflinethickness
70 rotated (-35*direction);
71 z1=(0.0rh_width,+0.25direction*rh_height);
72 z2=(0.5rh_width,-0.25direction*rh_height);
73 z3-z2=(stem_size*rh_width,+0.75*stem_size*direction*rh_height);
76 set_char_box(stafflinethickness#, wd# / 2,
82 % custos hufnagel, stem up, between staff lines
83 custos_hufnagel("Custos Hufnagel", "hufnagel-u0", "hufnagelu0",
84 dir_up, between_staff_lines);
86 % custos hufnagel, stem up, on staff line
87 custos_hufnagel("Custos Hufnagel", "hufnagel-u1", "hufnagelu1",
88 dir_up, on_staff_line);
90 % custos hufnagel, stem up, anywhere
91 custos_hufnagel("Custos Hufnagel", "hufnagel-u2", "hufnagelu2",
94 % custos hufnagel, stem down, between staff lines
95 custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d0", "hufnageld0",
96 dir_down, between_staff_lines);
98 % custos hufnagel, stem down, on staff line
99 custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d1", "hufnageld1",
100 dir_down, on_staff_line);
102 % custos hufnagel, stem down, anywhere
103 custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d2", "hufnageld2",
113 def custos_medicaea(expr verbose_name, internal_name, ly_name,
114 direction, staffline_adjustment) =
116 fet_beginchar(verbose_name, internal_name, ly_name)
119 a_b := 1.54; % b_h * a_b / a_w = wd / ht
123 save a, beta, ht, wd;
124 ht# = noteheight#; %% * mag;
127 wd# = 0.4a# / a_w; % width intentionally too small
128 black_notehead_width# := wd#;
130 define_pixels(ht, wd);
133 if staffline_adjustment = between_staff_lines:
135 elseif staffline_adjustment = on_staff_line:
137 else: % staffline_adjustment = anywhere
141 pickup pencircle xscaled blot_diameter yscaled 1.0ht;
143 z2 = z1 + (1.0wd - blot_diameter/2, 0);
146 pickup pencircle scaled stafflinethickness;
147 z3 = (1.0wd - stafflinethickness/2, 0.0ht);
148 z4 = z3 + (0, +direction*stem_size*ht);
151 set_char_box(0, wd#, ht# / 2, ht# / 2);
156 % custos medicaea, stem up, between staff lines
157 custos_medicaea("Custos Med.", "medicaea-u0", "medicaeau0",
158 dir_up, between_staff_lines);
160 % custos medicaea, stem up, on staff line
161 custos_medicaea("Custos Med.", "medicaea-u1", "medicaeau1",
162 dir_up, on_staff_line);
164 % custos medicaea, stem up, anywhere
165 custos_medicaea("Custos Med.", "medicaea-u2", "medicaeau2",
168 % custos medicaea, stem down, between staff lines
169 custos_medicaea("Reverse Custos Med.", "medicaea-d0", "medicaead0",
170 dir_down, between_staff_lines);
172 % custos medicaea, stem down, on staff line
173 custos_medicaea("Reverse Custos Med.", "medicaea-d1", "medicaead1",
174 dir_down, on_staff_line);
176 % custos medicaea, stem down, anywhere
177 custos_medicaea("Reverse Custos Med.", "medicaea-d2", "medicaead2",
183 % Editio Vaticana style
187 def custos_vaticana(expr verbose_name, internal_name, ly_name,
188 direction, staffline_adjustment) =
190 fet_beginchar(verbose_name, internal_name, ly_name)
193 a_b := 1.54; % b_h * a_b / a_w = wd / ht
197 save a, beta, ht, wd;
198 ht# = noteheight# ; %% * mag;
202 black_notehead_width# := wd#;
204 save offs, stem_size, stem_end, penwidth;
205 if staffline_adjustment = between_staff_lines:
207 elseif staffline_adjustment = on_staff_line:
209 else: % staffline_adjustment = anywhere
212 offs# = direction*0.05ht#;
213 stem_end# = direction*stem_size#*staff_space#;
215 define_pixels(offs, stem_end, ht, wd);
217 pickup pencircle scaled 0.6stafflinethickness;
224 penstroke z1e{z2 - z1} .. {right}z2e .. z3e;
233 set_char_box(0, wd#, offs#+0.3ht#, stem_end#);
235 set_char_box(0, wd#, -stem_end#, offs#+0.3ht#);
241 % custos vaticana, stem up, between staff lines
242 custos_vaticana("Custos Ed. Vat.", "vaticana-u0", "vaticanau0",
243 dir_up, between_staff_lines);
245 % custos vaticana, stem up, on staff line
246 custos_vaticana("Custos Ed. Vat.", "vaticana-u1", "vaticanau1",
247 dir_up, on_staff_line);
249 % custos vaticana, stem up, anywhere
250 custos_vaticana("Custos Ed. Vat.", "vaticana-u2", "vaticanau2",
253 % custos vaticana, stem down, between staff lines
254 custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d0", "vaticanad0",
255 dir_down, between_staff_lines);
257 % custos vaticana, stem down, on_staff_line
258 custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d1", "vaticanad1",
259 dir_down, on_staff_line);
261 % custos vaticana, stem down, anywhere
262 custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d2", "vaticanad2",
272 def custos_mensural(expr verbose_name, internal_name, ly_name,
273 direction, staffline_adjustment) =
275 fet_beginchar(verbose_name, internal_name, ly_name)
278 a_b:=1.54; % b_h * a_b / a_w = wd / ht
282 save a, beta, ht, wd;
286 wd# = 2a# / a_w; % width intentionally too small
287 set_char_box(0, wd#, ht# / 2, ht# / 2);
288 black_notehead_width# := wd#;
291 if staffline_adjustment = between_staff_lines:
293 elseif staffline_adjustment = on_staff_line:
295 else: % staffline_adjustment = anywhere
299 define_pixels(ht, wd);
301 xscaled stafflinethickness
303 rotated (-35*direction);
304 z1=(0.0wd,-direction*0.2ht);
305 z2=(0.2wd,+direction*0.2ht);
306 z3=(0.4wd,-direction*0.2ht);
307 z4=(0.6wd,+direction*0.2ht);
308 z5=(0.8wd,-direction*0.2ht);
309 z6-z5=(stem_size*0.5wd,+direction*stem_size*ht);
310 draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
315 % custos mensural, stem up, between staff lines
316 custos_mensural("Custos Mensural", "mensural-u0", "mensuralu0",
317 dir_up, between_staff_lines);
319 % custos mensural, stem up, on staff line
320 custos_mensural("Custos Mensural", "mensural-u1", "mensuralu1",
321 dir_up, on_staff_line);
323 % custos mensural, stem up, anywhere
324 custos_mensural("Custos Mensural", "mensural-u2", "mensuralu2",
327 % custos mensural, stem down, between staff lines
328 custos_mensural("Reverse Custos Mensural", "mensural-d0", "mensurald0",
329 dir_down, between_staff_lines);
331 % custos mensural, stem down, on staff line
332 custos_mensural("Reverse Custos Mensural", "mensural-d1", "mensurald1",
333 dir_down, on_staff_line);
335 % custos mensural, stem down, anywhere
336 custos_mensural("Reverse Custos Mensural", "mensural-d2", "mensurald2",
339 fet_endgroup ("custodes")