-% -*-Fundamental-*-
+% -%-Fundamental-%- -*-Metafont-*-
% parmesan-heads.mf -- implement ancient note heads
%
% source file of LilyPond's pretty-but-neat music font
%
-% (c) 2001--2003 Juergen Reuter <reuter@ipd.uka.de>
+% (c) 2001--2004 Juergen Reuter <reuter@ipd.uka.de>
%
% Neo-mensural heads originally by
% Christian Mondrup and Mats Bengtsson
fet_begingroup ("noteheads")
-noteheight#:=staff_space# + (1 + overdone_heads)*stafflinethickness#;
+%
+% character aligment:
+%
+% The head is assumed to be vertically centered around (0, 0).
+% The left-most edge of the head 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 match the head's width.
+%
+% * depth: Should match the bottom edge of the head. Affects vertical
+% collision handling.
+%
+% * height: Should match the top edge of the head. Affects vertical
+% collision handling.
+%
+% TODO: should depth/height include appendages/stems?
+
+overdone_heads = 0;
+noteheight# := staff_space# + (1 + overdone_heads)*stafflinethickness#;
define_pixels(noteheight);
%
%
%
-brevis_wid# := 2 staff_space#;
def draw_neo_brevis(expr brevwid) =
save beamheight, head_width;
x6 = x7 = head_width - stem_width/2;
y6 = y5;
- y7 = y5 - 2.25staff_space;
+ y7 = y5 - 2.25 staff_space;
pickup pencircle scaled stem_width;
draw z6 .. z7;
enddef;
fet_beginchar("Left stemmed notehead", "lneo_mensural", "mensuralleftstemmedhead");
- draw_neo_left_stemmed_head (brevis_wid#)
+ draw_neo_left_stemmed_head (2 staff_space#);
fet_endchar;
%
%
% (ze is wel breed)
%
-fet_beginchar("Maxima notehead", "-3neo_mensural", "mensuralmaximahead");
- draw_neo_longa (1.3 brevis_wid#)
+fet_beginchar("Maxima notehead", "-3neo_mensural", "neomensuralmaximahead");
+ draw_neo_longa (2.6 staff_space#)
fet_endchar;
-fet_beginchar("Longa notehead", "-2neo_mensural", "mensurallongahead");
- draw_neo_longa (brevis_wid#)
+fet_beginchar("Longa notehead", "-2neo_mensural", "neomensurallongahead");
+ draw_neo_longa (2 staff_space#)
fet_endchar;
-fet_beginchar("Brevis notehead", "-1neo_mensural", "mensuralbrevishead")
- draw_neo_brevis(brevis_wid#);
+fet_beginchar("Brevis notehead", "-1neo_mensural", "neomensuralbrevishead")
+ draw_neo_brevis(2 staff_space#);
fet_endchar;
-def draw_neo_mensural_black_head (expr wid) =
+def draw_neo_mensural_black_head (expr wid, height) =
save head_width;
head_width# = wid;
- set_char_box (0, head_width#, noteheight#/2, noteheight#/2);
-
+ set_char_box (0, head_width#, height/2, height/2);
+
+ charwx := head_width# / 2;
+ charwy := height / 2;
y3 = y1 =0;
x2 = x4 = (x1 + x3) /2;
filldraw z1 -- z2 -- z3 -- z4 -- cycle;
enddef;
-def draw_neo_mensural_open_head (expr wid)=
- draw_neo_mensural_black_head (wid);
+def draw_neo_mensural_open_head (expr wid, height)=
+ draw_neo_mensural_black_head (wid, height);
save diamNW, diamSW;
diamNW = length (z2 - z1) + blot_diameter;
diamSW = length (z4 - z1) + blot_diameter;
save hole_widthNW, hole_widthSW;
hole_widthNW = 0.34 diamNW ;
- hole_widthSW + 2.6 stafflinethickness = diamSW;
+ hole_widthSW + 2.6 linethickness = diamSW;
(z7 + z5)/2 = (w/2, 0);
(z8 + z6)/2 = (w/2, 0);
enddef;
fet_beginchar("Neo-mensural open head","0neo_mensural","neomensuralsemibrevishead")
- draw_neo_mensural_open_head (staff_space#);
+ draw_neo_mensural_open_head (staff_space#, noteheight#);
fet_endchar;
+%
+% WL says the thin lines should be thinner.
+%
+
+fet_beginchar("Harmonic notehead (Neo-mensural open)",
+ "0harmonic","harmonichead")
+
+ draw_neo_mensural_open_head (1.3 staff_space#, 1.3 noteheight#);
+ charwx := head_width#;
+ charwy := 0;
+fet_endchar;
+
+
fet_beginchar("Neo-mensural open head","1neo_mensural","neomensuralminimahead")
- draw_neo_mensural_open_head (staff_space#);
+ draw_neo_mensural_open_head (staff_space#, noteheight#);
fet_endchar;
fet_beginchar("Neo-mensural black head","2neo_mensural","neomensuralsemiminimahead")
- draw_neo_mensural_black_head (staff_space#);
+ draw_neo_mensural_black_head (staff_space#, noteheight#);
fet_endchar;
-brevis_wid# := 1 staff_space#;
def draw_brevis (expr wid) =
% TODO. For the moment, fall back to draw_neo_brevis.
enddef;
fet_beginchar("Left stemmed notehead", "lmensural", "mensuralleftstemmedhead");
- draw_left_stemmed_head (brevis_wid#)
+ draw_left_stemmed_head (staff_space#)
fet_endchar;
def draw_longa (expr wid) =
enddef;
fet_beginchar("Maxima notehead", "-3mensural", "mensuralmaximahead");
- draw_longa (2.0 brevis_wid#)
+ draw_longa (2.0 staff_space#)
fet_endchar;
fet_beginchar("Longa notehead", "-2mensural", "mensurallongahead");
- draw_longa (brevis_wid#)
+ draw_longa (staff_space#)
fet_endchar;
fet_beginchar("Brevis notehead", "-1mensural", "mensuralbrevishead")
- draw_brevis(brevis_wid#);
+ draw_brevis(staff_space#);
fet_endchar;
def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
define_pixels(head_width, head_height);
set_char_box (0, head_width#,
- head_height#/2, head_height#/2);
+ head_height#/2, head_height#/2);
+
+ charwx := head_width# / 2;
+ charwy := head_height# / 2 - linethickness#;
pickup pencircle
xscaled (min(blot_diameter, pen_w * head_width))
% parameterized punctum
def punctum_char (expr verbose_name, internal_name, ly_name,
left_stem, right_stem, linea, cavum,
- straight, auctum, direction_up, excentric, up_shift, mag) =
+ straight, auctum, direction_up, excentric, up_shift, down_shift, mag) =
fet_beginchar(verbose_name, internal_name, ly_name)
save b_h, a_w;
save yoffs;
if up_shift:
yoffs# = 0.08ht#;
+ elseif down_shift:
+ yoffs# = -0.11ht#;
else:
yoffs# = 0.00ht#;
fi
define_pixels(convexity, excentricity, yoffs, ht, wd);
- pickup pencircle scaled stafflinethickness;
+ pickup pencircle scaled linethickness;
path p;
save height, yoffs_bt;
define_pixels (height, yoffs_bt);
- height# = max (0.5ht# - stafflinethickness#, 0);
- yoffs_bt# = yoffs# - (height# - stafflinethickness#)/2 -
- convexity#;
+ height# = 0.47ht#;
+ yoffs_bt# = yoffs# - 0.5*height# - 0.25*convexity#;
xpart z1a = xpart z1b;
xpart z2a = xpart z2b;
xpart z3a = xpart z3b;
save box_top, box_bt;
if auctum:
- z1a = (0.00wd + stafflinethickness/2, yoffs_bt);
- z2a = (0.20wd, yoffs_bt + 1.0*convexity);
- z3a = (0.40wd - stafflinethickness/2,
+ z1a = (0.00wd + linethickness/2, yoffs_bt);
+ z2a = (0.21wd, yoffs_bt + 1.0*convexity);
+ z3a = (0.42wd - linethickness/2,
yoffs_bt + 1.0*excentricity);
box_top# = height# + yoffs_bt# +
max(0, 1.0*convexity#, 1.0*excentricity#);
p = z1a .. {right}z2a .. {direction}z3a --
z3b{-direction} .. z2b{left} .. z1b -- cycle;
elseif excentric:
- z1a = (0.00wd + stafflinethickness/2,
+ z1a = (0.00wd + linethickness/2,
yoffs_bt - 1.0*convexity);
z2a = (0.08wd, yoffs_bt + 1.4*convexity);
- z3a = (0.40wd - stafflinethickness/2, yoffs_bt);
+ z3a = (0.42wd - linethickness/2,
+ yoffs_bt - 1.0*convexity);
box_top# = height# + yoffs_bt# +
max(-1.0*convexity#, 1.4*convexity#, 0);
box_bt# = yoffs_bt# +
p = z1a{direction} .. z2a{right} .. z3a --
z3b .. {left}z2b .. {-direction}z1b -- cycle;
else:
- z1a = (0.00wd + stafflinethickness/2, yoffs_bt);
- z2a = (0.20wd, yoffs_bt + 1.0*convexity);
- z3a = (0.40wd - stafflinethickness/2, yoffs_bt);
+ z1a = (0.00wd + linethickness/2, yoffs_bt);
+ z2a = (0.21wd, yoffs_bt + 1.0*convexity);
+ z3a = (0.42wd - linethickness/2, yoffs_bt);
box_top# = height# + yoffs_bt# +
max(0, 1.0*convexity#);
box_bt# = yoffs_bt# +
filldraw p;
fi;
- pickup pencircle scaled stafflinethickness;
+ pickup pencircle scaled 0.6linethickness;
+
+ save stem_bt;
if left_stem:
- z5=(0.00wd + stafflinethickness/2, yoffs);
- z6=(0.00wd + stafflinethickness/2, yoffs - 1.5ht);
+ z5=(0.00wd + 0.6linethickness/2, yoffs);
+ z6=(0.00wd + 0.6linethickness/2, yoffs - 1.1ht);
draw z5 -- z6;
- fi;
-
- if right_stem:
- z5=(0.40wd - stafflinethickness/2, yoffs);
- z6=(0.40wd - stafflinethickness/2, yoffs - 1.5ht);
+ stem_bt# = yoffs# - 1.1ht#;
+ elseif right_stem:
+ z5=(0.42wd - 0.6linethickness/2, yoffs);
+ z6=(0.42wd - 0.6linethickness/2, yoffs - 1.5ht);
draw z5 -- z6;
- fi;
-
- save stem_bt;
-
- if left_stem or right_stem:
stem_bt# = yoffs# - 1.5ht#;
else:
stem_bt# = 0;
fi;
- set_char_box(0.00wd#, 0.40wd#,
- max(0, -box_bt#, -stem_bt#) + stafflinethickness#/2,
- max(0, box_top#) + stafflinethickness#/2);
+ set_char_box(0.00wd#, 0.42wd#,
+ max(0, -box_bt#, -stem_bt#) + linethickness#/2,
+ max(0, box_top#) + linethickness#/2);
if linea:
save linea_width, linea_height;
- linea_width# = stafflinethickness#;
- linea_height# = 0.85 ht#;
+ linea_width# = 0.6 linethickness#;
+ linea_height# = 0.7 ht#;
define_pixels (linea_width, linea_height);
draw_block ((-0.10wd - linea_width/2,
- linea_height/2),
+ -linea_height/2),
(-0.10wd + linea_width/2,
- linea_height/2));
- draw_block ((+0.50wd - linea_width/2,
- linea_height/2),
- (+0.50wd + linea_width/2,
- linea_height/2));
- set_char_box(0.10wd# + linea_width#/2,
- 0.50wd# + linea_width#/2,
+ +linea_height/2));
+ draw_block ((+0.52wd - linea_width/2,
+ -linea_height/2),
+ (+0.52wd + linea_width/2,
+ +linea_height/2));
+ set_char_box(0,
+ 0.62wd# + linea_width#,
linea_height#/2,
linea_height#/2);
+ currentpicture := currentpicture
+ shifted (0.10wd + linea_width/2, 0);
fi;
fet_endchar;
enddef;
if stropha:
pickup pencircle
- xscaled (0.2*head_height)
- yscaled (0.5*head_height)
+ xscaled (0.25*head_height)
+ yscaled (0.55*head_height)
rotated alpha#;
save za, off_angle; pair za;
off_angle := 15;
za = (0, -0.25*head_height)
rotated -(alpha# + off_angle)
- shifted (0.5 head_width, 0);
+ shifted (0.48 head_width, -0.02 head_width);
undraw za;
fi;
if auctum:
- pickup pencircle scaled stafflinethickness;
- save za, zb;
- pair za, zb;
- za = (0, -0.5 head_height + stafflinethickness);
- zb = za + (0.5 head_width, 0);
- draw za{(0,-1) rotated alpha#} ..
- {(0,1) rotated -alpha#}zb;
+ pickup pencircle scaled linethickness;
+ save za, zb, zc;
+ pair za, zb, zc;
+ za = (0, -0.5 head_height + linethickness);
+ zb = 0.6 (za + zc);
+ zc = za + (0.52 head_width, 0);
+ draw za{(0,-1) rotated alpha#} .. {right}zb{right} ..
+ {(0,1) rotated -alpha#}zc;
fi;
fet_endchar;
enddef;
% punctum
punctum_char("Ed. Vat. punctum", "vaticana_punctum", "vatpunctumhead",
false, false, false, false, false,
- false, false, false, false, 1.0);
+ false, false, false, false, false, 1.0);
% punctum cavum (for OpusTeX compatibility)
punctum_char("Ed. Vat. punctum cavum", "vaticana_punctum_cavum",
"vatpunctumcavumhead",
false, false, false, true, false,
- false, false, false, false, 1.0);
+ false, false, false, false, false, 1.0);
% linea punctum (for OpusTeX compatibility)
punctum_char("Ed. Vat. linea punctum", "vaticana_linea_punctum",
"vatlineapunctumhead",
false, false, true, false, false,
- false, false, false, false, 1.0);
+ false, false, false, false, false, 1.0);
% linea punctum cavum (for OpusTeX compatibility)
punctum_char("Ed. Vat. linea punctum cavum", "vaticana_linea_punctum_cavum",
"vatlineapunctumcavumhead",
false, false, true, true, false,
- false, false, false, false, 1.0);
+ false, false, false, false, false, 1.0);
% punctum inclinatum
inclinatum_char("Ed. Vat. inclinatum", "vaticana_inclinatum",
"vatinclinatumhead",
false, false, false);
-% virga (i.e. right stemmed punctum)
-punctum_char("Ed. Vat. virga", "vaticana_virga", "vatvirgahead",
- false, true, false, false, false,
- false, false, false, false, 1.0);
-
-% left stemmed punctum as used in clivis (flexa) ligature
-punctum_char("Ed. Vat. reverse virga", "vaticana_rvirga", "vatrvirgahead",
- true, false, false, false, false,
- false, false, false, false, 1.0);
-
% pes lower punctum
punctum_char("Ed. Vat. pes lower punctum", "vaticana_lpes", "vatlpeshead",
false, false, false, false, true,
- false, true, false, false, 1.0);
+ false, true, false, false, false, 1.0);
+
+% pes lower punctum
+punctum_char("Ed. Vat. pes var lower punctum", "vaticana_vlpes", "vatvlpeshead",
+ false, false, false, false, true,
+ false, true, false, false, true, 1.0);
% pes upper punctum
punctum_char("Ed. Vat. pes upper punctum", "vaticana_upes", "vatupeshead",
false, false, false, false, true,
- false, false, false, false, 1.0);
+ false, false, false, false, false, 1.0);
% pes upper punctum (shifted variation)
%
-% Note: This note head is used instead of the regular pes upper
-% punctum to avoid collision with the lower punctum note of the pes when
-% the upper punctum sits directly on top of the lower punctum.
+% This note head is used instead of the regular pes upper punctum to
+% avoid collision with the lower punctum note of the pes when the upper
+% punctum sits directly on top of the lower punctum.
%
punctum_char("Ed. Vat. var pes upper punctum", "vaticana_vupes",
"vatvupeshead",
false, false, false, false, true,
- false, false, false, true, 1.0);
+ false, false, false, true, false, 1.0);
% small punctum as used in epiphonus
punctum_char("Ed. Vat. plica", "vaticana_plica", "vatplicahead",
false, false, false, false, false,
- false, false, false, false, 0.7);
+ false, false, false, false, false, 0.6);
% excentric punctum as used in epiphonus
punctum_char("Ed. Vat. epiphonus", "vaticana_epiphonus", "vatepiphonushead",
false, false, false, false, false,
- false, true, true, false, 1.0);
+ false, true, true, false, false, 1.0);
+
+% excentric punctum as used in epiphonus (shifted variation)
+%
+% This note head is used instead of the regular epiphonus punctum to
+% avoid collision with the plica head when the plica sits directly on
+% top of the lower head.
+%
+punctum_char("Ed. Vat. var epiphonus", "vaticana_vepiphonus", "vatvepiphonushead",
+ false, false, false, false, false,
+ false, true, true, false, true, 1.0);
% small punctum as used in cephalicus
punctum_char("Ed. Vat. rev. plica", "vaticana_reverse_plica", "vatrplicahead",
false, false, false, false, false,
- false, true, false, false, 0.7);
+ false, true, false, false, false, 0.6);
% excentric punctum as used in cephalicus; without left stem
punctum_char("Ed. Vat. cephalicus", "vaticana_inner_cephalicus",
"vatinnercephalicushead",
false, false, false, false, false,
- false, false, true, false, 1.0);
+ false, false, true, false, false, 1.0);
% excentric punctum as used in cephalicus; with left stem
punctum_char("Ed. Vat. cephalicus", "vaticana_cephalicus",
"vatcephalicushead",
true, false, false, false, false,
- false, false, true, false, 1.0);
+ false, false, true, false, false, 1.0);
% quilisma
fet_beginchar("Ed. Vat. quilisma", "vaticana_quilisma", "vatquilismahead")
2beta# = ht#*b_h;
a# = beta#*a_b;
wd# = 2a# / a_w;
- set_char_box(0, 0.40wd#, 0.31 ht#, 0.41 ht#);
+ set_char_box(0, 0.42wd#, 0.28 ht#, 0.36 ht#);
black_notehead_width# := wd#;
define_pixels(ht, wd);
- pickup pencircle xscaled stafflinethickness yscaled 0.4ht;
- lft x1 = 0.00wd; bot y1 = -0.31ht;
- lft x2 = 0.00wd; y2 = +0.06ht;
- x3 = 0.10wd; y3 = -0.05ht;
- x4 = 0.16wd; y4 = +0.11ht;
- x5 = 0.24wd; y5 = -0.01ht;
- x6 = 0.30wd; y6 = +0.15ht;
- rt x7 = 0.40wd; y7 = +0.04ht;
- rt x8 = 0.40wd; top y8 = +0.41ht;
- draw z1 -- z2 -- z3 -- z4 -- z5 -- z6 -- z7 -- z8;
+ pickup pencircle xscaled linethickness yscaled 0.44ht;
+ lft x1 = 0.00wd; bot y1 = -0.28ht;
+ x2 = 0.11wd; y2 = -0.14ht;
+ x3 = 0.12wd; y3 = +0.03ht;
+ x4 = 0.25wd; y4 = -0.09ht;
+ x5 = 0.26wd; y5 = +0.08ht;
+ x6 = 0.40wd; y6 = -0.04ht;
+ rt x7 = 0.42wd; top y7 = +0.36ht;
+ draw z1 .. z2 -- z3 .. z4 -- z5 .. z6 -- z7;
fet_endchar;
% solesmes punctum inclinatum parvum
punctum_char("Solesmes punctum auctum ascendens", "solesmes_auct_asc",
"solauctaschead",
false, false, false, false, false,
- true, true, false, false, 1.0);
+ true, true, false, false, false, 1.0);
% solesmes punctum auctum descendens
punctum_char("Solesmes punctum auctum descendens", "solesmes_auct_desc",
"solauctdeschead",
false, false, false, false, false,
- true, false, false, false, 1.0);
+ true, false, false, false, false, 1.0);
% solesmes punctum inclinatum auctum
inclinatum_char("Solesmes punctum incl. auctum", "solesmes_incl_auctum",
xscaled blot_diameter
yscaled 0.50ht;
z1 = (0.00wd + blot_diameter/2, 0);
- z2 = (0.40wd - blot_diameter/2, 0);
+ z2 = (0.4wd - blot_diameter/2, 0);
draw z1 .. z2;
pickup pencircle
- xscaled stafflinethickness
+ xscaled linethickness
yscaled blot_diameter;
if left_down_stem:
- z4=(0.00wd + stafflinethickness/2, blot_diameter/2);
- z5=(0.00wd + stafflinethickness/2, - 1.25ht);
+ z4=(0.00wd + linethickness/2, blot_diameter/2);
+ z5=(0.00wd + linethickness/2, - 1.25ht);
draw z4 .. z5;
set_char_box(0.0, 0.4wd#, 1.25ht#, 0.25ht#);
elseif left_up_stem:
- z4=(0.00wd + stafflinethickness/2, blot_diameter/2);
- z5=(0.00wd + stafflinethickness/2, + 1.25ht);
+ z4=(0.00wd + linethickness/2, blot_diameter/2);
+ z5=(0.00wd + linethickness/2, + 1.25ht);
draw z4 .. z5;
set_char_box(0.0, 0.4wd#, 0.25ht#, 1.25ht#);
else:
set_char_box(0, width#, height#/2, height#/2);
- pickup pencircle scaled stafflinethickness;
+ pickup pencircle scaled linethickness;
define_pixels(width, height);
rt x3 = -lft x1 = width/2;