-% -*-Fundamental-*-
+% -%-Fundamental-%- -*-Metafont-*-
% parmesan-custodes.mf -- implement ancient custodes
%
% source file of LilyPond's pretty-but-neat music font
%
-% (c) 2000--2003 Juergen Reuter <reuter@ipd.uka.de>
+% (c) 2000--2004 Juergen Reuter <reuter@ipd.uka.de>
%
save black_notehead_width;
fet_begingroup ("custodes")
-noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
-define_pixels(noteheight);
+%
+% character aligment:
+%
+% The custos is assumed to be vertically centered around (0, 0).
+% The left-most edge of the custos should touch the vertical line
+% that goes though the point (0, 0).
+%
+% set_char_box() conventions:
+%
+% * breapth: Ignored (as far as I know). Should be set to 0.
+%
+% * width: Should cover the horizontal range of the custos that is to
+% be printed in the staff. If the custos has an appendage that is
+% supposed to reach beyond the right end of the staff, the width
+% should be set such that the appendage is outside of the char box.
+%
+% * depth: Should match the bottom edge of the custos. Affects
+% vertical collision handling.
+%
+% * height: Should match the top edge of the custos. Affects vertical
+% collision handling.
+%
save between_staff_lines, on_staff_line, anywhere;
between_staff_lines = 0;
define_pixels(ht, wd, pen_size, stem_ht);
pickup pencircle
- xscaled stafflinethickness
+ xscaled linethickness
yscaled pen_size
rotated -dalpha#;
(y3 - y2) = (x3 - x2) * tand(90-dalpha#);
draw z1 -- z2 -- z3;
+ % The stem is intentionally outside of the char box.
if direction > 0:
set_char_box(0, wd#, ht#/2, stem_ht#);
else:
define_pixels(ht, wd, stem_ht);
- pickup pencircle xscaled 0.6stafflinethickness yscaled ht;
+ pickup pencircle xscaled 0.6linethickness yscaled ht;
lft x1 = 0;
y1 = 0;
rt x2 = wd;
y2 = y1;
draw z1 -- z2;
- pickup pencircle scaled 0.6stafflinethickness;
+ pickup pencircle scaled 0.6linethickness;
rt x3 = wd;
y3 = 0;
x4 = x3;
define_pixels(u_offs, l_offs, stem_end, ht, wd, pen_ht);
- pickup pencircle scaled 0.6stafflinethickness;
+ pickup pencircle scaled 0.6linethickness;
z1 = (0, u_offs);
z2 = (0.7wd, l_offs);
z3 = (wd, l_offs);
define_pixels(ht, wd, stem_ht);
pickup pencircle
- xscaled stafflinethickness
+ xscaled linethickness
yscaled 0.4ht
rotated -dalpha#;
draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
+ % The stem is intentionally outside of the char box.
if direction > 0:
set_char_box(0, wd#, +direction*0.33ht#, stem_ht#);
else: