Real ypos_correction = -0.1 * staff_space * sign (slope);
Real slope_correction = 0.2 * staff_space * sign (slope);
Real corrected_slope = slope + slope_correction / width;
+ Real blotdiameter
+ = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
+ width += 2 * blotdiameter;
if (solid) // colorated flexae
{
- stencil = Lookup::beam (corrected_slope, width * 0.5, staff_space, 0.0);
+ stencil = Lookup::beam (corrected_slope, width * 0.5, staff_space, blotdiameter);
}
else // outline
{
- stencil = Lookup::beam (corrected_slope, thickness, height, 0.0);
+ stencil = Lookup::beam (corrected_slope, thickness, height, blotdiameter);
if (!begin)
{
stencil.translate_axis (width * 0.5 - thickness, X_AXIS);
Stencil bottom_edge
= Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
- 0.0);
+ blotdiameter);
bottom_edge.translate_axis (-0.5 * height, Y_AXIS);
stencil.add_stencil (bottom_edge);
Stencil top_edge
= Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
- 0.0);
+ blotdiameter);
top_edge.translate_axis (+0.5 * height, Y_AXIS);
stencil.add_stencil (top_edge);
}
stencil.translate_axis (ypos_correction, Y_AXIS);
else
{
- stencil.translate_axis (0.5 * thickness, X_AXIS);
+ stencil.translate_axis (0.5 * thickness - blotdiameter, X_AXIS);
stencil.translate_axis (interval / -4.0 * staff_space, Y_AXIS);
}
case MLP_BREVIS:
duration_log--;
suffix = to_string (duration_log) + color
- + (duration_log == -3 ? "lig" : "") + "mensural";
+ + (duration_log < -1 ? "lig" : "") + "mensural";
index = prefix + "s";
- out = fm->find_by_name (index + suffix);
- if (out.is_empty ())
- index = prefix + "d";
out = fm->find_by_name (index + "r" + suffix);
if (!out.is_empty ()
&& !Staff_symbol_referencer::on_line
return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
}
- Real blotdiameter
- = (me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter")));
+ /*
+ we use thickness because the stem end of the glyph
+ "noteheads.sM2ligmensural" is round.
+ */
+ Real blotdiameter = thickness;
+ /*
+ instead of 2.5 the length of a longa stem should be used
+ Font_interface::get_default_font (???)->find_by_name
+ ("noteheads.sM2ligmensural").extent (Y_AXIS).length () * 0.5
+ */
+ Real stem_length = 2.5 * staff_space;
if (primitive & MLP_STEM)
{
// assume MLP_UP
- Real y_bottom = 0.5 * staff_space, y_top = 2.5 * staff_space;
+ Real y_bottom = 0.0, y_top = stem_length;
if (primitive & MLP_DOWN)
{
y_bottom = -y_top;
- y_top = -0.5 * staff_space;
+ y_top = 0.0;
}
Interval x_extent (0, thickness);
to serve as stem as well
*/
if (primitive & MLP_LONGA)
- /*
- instead of 3.0 the length of a longa stem should be used
- Font_interface::get_default_font (???)->find_by_name
- ("noteheads.s-2mensural").extent (Y_AXIS).length () * 0.5
- */
- y_bottom -= 2.5 * staff_space;
+ y_bottom -= stem_length + 0.25 * blotdiameter;
}
Interval x_extent (width - thickness, width);
head_height# / 2, head_height# / 2);
2 beamheight + holeheight = head_height;
- serif_size := .75 linethickness;
+ serif_size := blot_diameter;
serif_protrude := .15 head_height;
z1l = (0, 0);
enddef;
-def draw_neomensural_black_head (expr wid, height) =
- save head_height, head_width, stem_width;
- save ne, nw, ne_dist, nw_dist, penthickness;
+def draw_neomensural_black_head (expr width, height) =
+ save head_width, head_height, stem_width;
+ save ne, nw, ne_dist, nw_dist;
pair ne, nw, ne_dist, nw_dist;
- penthickness# = linethickness#;
- head_height# := height + penthickness#;
- head_width# := wid + penthickness#;
+ head_width# := width;
+ head_height# := height;
stem_width# := 1.3 linethickness#;
set_char_box (0, head_width#,
charwx := head_width# / 2;
charwy := head_height# / 2 - 2 stem_width#;
- define_pixels (penthickness);
-
y3 = y1 = 0;
x2 = x4 = 1/2 [x1, x3];
- pickup pencircle scaled penthickness;
+ pickup pencircle scaled blot_diameter;
top y2 = h;
bot y4 = -d;
rt x3 = w;
ne := unitvector (z2 - z1);
- nw_dist := (ne rotated 90) * penthickness / 2;
+ nw_dist := (ne rotated 90) * blot_diameter / 2;
nw := unitvector (z2 - z3);
- ne_dist := (nw rotated -90) * penthickness / 2;
+ ne_dist := (nw rotated -90) * blot_diameter / 2;
fill lft z1
.. (z1 + nw_dist)
enddef;
-def draw_neomensural_open_head (expr wid, height)=
- draw_neomensural_black_head (wid, height);
+def draw_neomensural_open_head (expr width, height)=
+ draw_neomensural_black_head (width, height);
save headNW, headSW, stem_width;
- headNW = length (z2 - z1) + penthickness;
- headSW = length (z4 - z1) + penthickness;
+ headNW = length (z2 - z1) + blot_diameter;
+ headSW = length (z4 - z1) + blot_diameter;
stem_width = 1.3 linethickness;
save hole_widthNW, hole_widthSW;
(rt z7 + lft z5) / 2 = (w / 2, 0);
(bot z8 + top z6) / 2 = (w / 2, 0);
- z6 - z5 = (hole_widthNW - penthickness) * unitvector (z2 - z1);
- z7 - z6 = (hole_widthSW - penthickness) * unitvector (z4 - z1);
+ z6 - z5 = (hole_widthNW - blot_diameter) * unitvector (z2 - z1);
+ z7 - z6 = (hole_widthSW - blot_diameter) * unitvector (z4 - z1);
unfill lft z5
.. (z5 + nw_dist)
enddef;
-def draw_mensural_longa (expr wid, holeheight, open, full, direction) =
+def draw_mensural_longa (expr wid, holeheight, open, full, direction, ligature) =
draw_mensural_brevis (wid, holeheight, open, full);
save dir;
z17 = (x7, y7 - dir * stem_width / 2);
penpos6 (stem_width, 0);
- penpos7 (1.5 stem_width, 0);
+ if ligature:
+ penpos7 (stem_width, 0);
+ else:
+ penpos7 (1.5 stem_width, 0);
+ fi;
fill z7l
-- z6l
m_red_holeheight := nm_red_holeheight;
fet_beginchar ("Mensural maxima notehead (up)", "uM3mensural");
- draw_mensural_longa (m_maxima_width, m_holeheight, true, true, 1);
+ draw_mensural_longa (m_maxima_width, m_holeheight, true, true, 1, false);
fet_endchar;
fet_beginchar ("Mensural maxima notehead (down)", "dM3mensural");
- draw_mensural_longa (m_maxima_width, m_holeheight, true, true, -1);
+ draw_mensural_longa (m_maxima_width, m_holeheight, true, true, -1, false);
fet_endchar;
fet_beginchar ("Mensural maxima notehead (ligature)", "sM3ligmensural");
fet_endchar;
fet_beginchar ("Mensural longa notehead (up)", "uM2mensural");
- draw_mensural_longa (m_longa_width, m_holeheight, true, true, 1);
+ draw_mensural_longa (m_longa_width, m_holeheight, true, true, 1, false);
fet_endchar;
fet_beginchar ("Mensural longa notehead (down)", "dM2mensural");
- draw_mensural_longa (m_longa_width, m_holeheight, true, true, -1);
+ draw_mensural_longa (m_longa_width, m_holeheight, true, true, -1, false);
+fet_endchar;
+
+fet_beginchar ("Mensural longa notehead (ligature)", "sM2ligmensural");
+ draw_mensural_longa (m_longa_width, m_holeheight, true, true, -1, true);
fet_endchar;
fet_beginchar ("Mensural brevis notehead", "sM1mensural");
fet_endchar;
fet_beginchar ("Mensural maxima notehead (up, reduced hole)", "urM3mensural");
- draw_mensural_longa (m_maxima_width, m_red_holeheight, true, true, 1);
+ draw_mensural_longa (m_maxima_width, m_red_holeheight, true, true, 1, false);
fet_endchar;
fet_beginchar ("Mensural maxima notehead (down, reduced hole)", "drM3mensural");
- draw_mensural_longa (m_maxima_width, m_red_holeheight, true, true, -1);
+ draw_mensural_longa (m_maxima_width, m_red_holeheight, true, true, -1, false);
fet_endchar;
fet_beginchar ("Mensural maxima notehead (ligature, reduced hole)", "srM3ligmensural");
fet_endchar;
fet_beginchar ("Mensural longa notehead (up, reduced hole)", "urM2mensural");
- draw_mensural_longa (m_longa_width, m_red_holeheight, true, true, 1);
+ draw_mensural_longa (m_longa_width, m_red_holeheight, true, true, 1, false);
fet_endchar;
fet_beginchar ("Mensural longa notehead (down, reduced hole)", "drM2mensural");
- draw_mensural_longa (m_longa_width, m_red_holeheight, true, true, -1);
+ draw_mensural_longa (m_longa_width, m_red_holeheight, true, true, -1, false);
+fet_endchar;
+
+fet_beginchar ("Mensural longa notehead (ligature, reduced hole)", "srM2ligmensural");
+ draw_mensural_longa (m_longa_width, m_red_holeheight, true, true, -1, true);
fet_endchar;
fet_beginchar ("Mensural brevis notehead (reduced hole)", "srM1mensural");
%
fet_beginchar ("Semi-colored mensural maxima notehead (up)", "uM3semimensural");
- draw_mensural_longa (m_maxima_width, m_holeheight, true, false, 1);
+ draw_mensural_longa (m_maxima_width, m_holeheight, true, false, 1, false);
fet_endchar;
fet_beginchar ("Semi-colored mensural maxima notehead (down)", "dM3semimensural");
- draw_mensural_longa (m_maxima_width, m_holeheight, true, false, -1);
+ draw_mensural_longa (m_maxima_width, m_holeheight, true, false, -1, false);
fet_endchar;
fet_beginchar ("Semi-colored mensural maxima notehead (ligature)", "sM3semiligmensural");
fet_endchar;
fet_beginchar ("Semi-colored mensural longa notehead (up)", "uM2semimensural");
- draw_mensural_longa (m_longa_width, m_holeheight, true, false, 1);
+ draw_mensural_longa (m_longa_width, m_holeheight, true, false, 1, false);
fet_endchar;
fet_beginchar ("Semi-colored mensural longa notehead (down)", "dM2semimensural");
- draw_mensural_longa (m_longa_width, m_holeheight, true, false, -1);
+ draw_mensural_longa (m_longa_width, m_holeheight, true, false, -1, false);
+fet_endchar;
+
+fet_beginchar ("Semi-colored mensural longa notehead (ligature)", "sM2semiligmensural");
+ draw_mensural_longa (m_longa_width, m_holeheight, true, false, -1, true);
fet_endchar;
fet_beginchar ("Semi-colored mensural brevis notehead", "sM1semimensural");
fet_endchar;
fet_beginchar ("Semi-colored mensural maxima notehead (up, reduced hole)", "urM3semimensural");
- draw_mensural_longa (m_maxima_width, m_red_holeheight, true, false, 1);
+ draw_mensural_longa (m_maxima_width, m_red_holeheight, true, false, 1, false);
fet_endchar;
fet_beginchar ("Semi-colored mensural maxima notehead (down, reduced hole)", "drM3semimensural");
- draw_mensural_longa (m_maxima_width, m_red_holeheight, true, false, -1);
+ draw_mensural_longa (m_maxima_width, m_red_holeheight, true, false, -1, false);
fet_endchar;
fet_beginchar ("Semi-colored mensural maxima notehead (ligature, reduced hole)", "srM3semiligmensural");
fet_endchar;
fet_beginchar ("Semi-colored mensural longa notehead (up, reduced hole)", "urM2semimensural");
- draw_mensural_longa (m_longa_width, m_red_holeheight, true, false, 1);
+ draw_mensural_longa (m_longa_width, m_red_holeheight, true, false, 1, false);
fet_endchar;
fet_beginchar ("Semi-colored mensural longa notehead (down, reduced hole)", "drM2semimensural");
- draw_mensural_longa (m_longa_width, m_red_holeheight, true, false, -1);
+ draw_mensural_longa (m_longa_width, m_red_holeheight, true, false, -1, false);
+fet_endchar;
+
+fet_beginchar ("Semi-colored mensural longa notehead (ligature, reduced hole)", "srM2semiligmensural");
+ draw_mensural_longa (m_longa_width, m_red_holeheight, true, false, -1, true);
fet_endchar;
fet_beginchar ("Semi-colored mensural brevis notehead (reduced hole)", "srM1semimensural");
%
fet_beginchar ("Black mensural maxima notehead (up)", "uM3blackmensural");
- draw_mensural_longa (m_maxima_width, 0, false, false, 1);
+ draw_mensural_longa (m_maxima_width, 0, false, false, 1, false);
fet_endchar;
fet_beginchar ("Black mensural maxima notehead (down)", "dM3blackmensural");
- draw_mensural_longa (m_maxima_width, 0, false, false, -1);
+ draw_mensural_longa (m_maxima_width, 0, false, false, -1, false);
fet_endchar;
fet_beginchar ("Black mensural maxima notehead (ligature)", "sM3blackligmensural");
fet_endchar;
fet_beginchar ("Black mensural longa notehead (up)", "uM2blackmensural");
- draw_mensural_longa (m_longa_width, 0, false, false, 1);
+ draw_mensural_longa (m_longa_width, 0, false, false, 1, false);
fet_endchar;
fet_beginchar ("Black mensural longa notehead (down)", "dM2blackmensural");
- draw_mensural_longa (m_longa_width, 0, false, false, -1);
+ draw_mensural_longa (m_longa_width, 0, false, false, -1, false);
+fet_endchar;
+
+fet_beginchar ("Black mensural longa notehead (ligature)", "sM2blackligmensural");
+ draw_mensural_longa (m_longa_width, 0, false, false, -1, true);
fet_endchar;
fet_beginchar ("Black mensural brevis notehead", "sM1blackmensural");
% Josquin Desprez, BNF
save petrucci_width, petrucci_height;
-petrucci_height := 1.3 noteheight#;
+petrucci_height := 1.4 noteheight#;
petrucci_width := .72 petrucci_height;
fet_beginchar ("Petrucci semibrevis head", "s0petrucci");