X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2Fparmesan-heads.mf;h=b897554d883a7f53b96aa2f281674e7e9e20429a;hb=d64ad7507e1cbd52a70bb5c9f885877041b3a7f8;hp=37fc40c820157bdfa89fb9b9cc9e6713616cf07e;hpb=7f2be65b785d842ebfac2b4fd1b6533aa09ac88f;p=lilypond.git diff --git a/mf/parmesan-heads.mf b/mf/parmesan-heads.mf index 37fc40c820..b897554d88 100644 --- a/mf/parmesan-heads.mf +++ b/mf/parmesan-heads.mf @@ -3,7 +3,7 @@ % % source file of LilyPond's pretty-but-neat music font % -% (c) 2001--2006 Juergen Reuter +% (c) 2001--2009 Juergen Reuter % % Neo-mensural heads originally by % Christian Mondrup and Mats Bengtsson @@ -12,7 +12,7 @@ save black_notehead_width; numeric black_notehead_width; -fet_begingroup ("noteheads") +fet_begingroup ("noteheads"); % % character aligment: @@ -145,38 +145,6 @@ fet_beginchar ("Left stemmed notehead", "slneomensural"); fet_endchar; -% -% Find point on `curve' which gives the tangent between point `p' -% and `curve'. To guide the search, two auxiliary points must be -% specified, `p_in' and `p_out'. The line between `p' and `p_in' -% must intersect `curve', while the line between `p' and `p_out' -% must not. -% -def find_tangent (expr p, curve, p_in, p_out) = - begingroup; - save mid, t, t_good, in, out; - pair mid, in, out; - - in := p_in; - out := p_out; - - forever: - mid := 0.5 [in, out]; - exitif abs (out - mid) <= eps; - t := xpart (curve intersectiontimes (p -- mid)); - if (t > 0): - in := mid; - t_good := t; - else: - out := mid; - fi; - endfor; - - point t_good of curve - endgroup -enddef; - - % % Some sources (eg. Musix/OpusTeX) think that the appendage should be on % the left, some say right. Right wins democratically. @@ -214,17 +182,17 @@ enddef; % % (ze is wel breed) % -fet_beginchar ("Neo-mensural maxima notehead", "s-3neomensural"); +fet_beginchar ("Neo-mensural maxima notehead", "sM3neomensural"); draw_neomensural_longa (2.6 staff_space#); fet_endchar; -fet_beginchar ("Neo-mensural longa notehead", "s-2neomensural"); +fet_beginchar ("Neo-mensural longa notehead", "sM2neomensural"); draw_neomensural_longa (2 staff_space#); fet_endchar; -fet_beginchar ("Neo-mensural brevis notehead", "s-1neomensural"); +fet_beginchar ("Neo-mensural brevis notehead", "sM1neomensural"); draw_neomensural_brevis (2 staff_space#); fet_endchar; @@ -396,73 +364,21 @@ fet_beginchar ("Mensural left stemmed notehead", "slmensural"); fet_endchar; -fet_beginchar ("Mensural maxima notehead", "s-3mensural"); +fet_beginchar ("Mensural maxima notehead", "sM3mensural"); draw_mensural_longa (2.0 staff_space#); fet_endchar; -fet_beginchar ("Mensural longa notehead", "s-2mensural"); +fet_beginchar ("Mensural longa notehead", "sM2mensural"); draw_mensural_longa (staff_space#); fet_endchar; -fet_beginchar ("Mensural brevis notehead", "s-1mensural"); +fet_beginchar ("Mensural brevis notehead", "sM1mensural"); draw_mensural_brevis (staff_space#); fet_endchar; -% -% Shift `curve' along the line given by the auxiliary points `p_in' -% and `p_out' until `line' is a tangent, and return the shift. -% If `curve' is shifted to position `p_in', it must intersect -% `line', while shifted to `p_out' it must not. -% -def find_tangent_shift (expr line, curve, p_in, p_out) = - begingroup; - save mid, t, t_good, in, out; - pair mid, in, out; - - in := p_in; - out := p_out; - - forever: - mid := 0.5 [in, out]; - exitif abs (out - mid) <= eps; - t := xpart ((curve shifted mid) intersectiontimes line); - if (t > 0): - in := mid; - t_good := t; - else: - out := mid; - fi; - endfor; - - mid - endgroup -enddef; - - -% -% Get subpath specified by `dir_in' and `dir_out' of `curve' -% which is then shifted by `offset'. Assure that result has -% the same orientation as `curve'. -% -def get_subpath (expr curve, dir_in, dir_out, offset) = - begingroup; - save t_in, t_out; - - t_in := directiontime dir_in of curve; - t_out := directiontime dir_out of curve; - - if t_in > t_out: - t_out := t_out + length curve; - fi; - - (subpath (t_in, t_out) of curve) shifted offset - endgroup -enddef; - - def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) = save head_width, head_height; save ellipse, ellipse_r; @@ -566,9 +482,9 @@ fet_endchar; % % -def punctum_char (expr verbose_name, internal_name, - linea, cavum, straight, auctum, - d_up, up_shift, down_shift, mag) = +def vat_punctum_char (expr verbose_name, internal_name, + linea, cavum, straight, auctum, + d_up, up_shift, down_shift, mag) = fet_beginchar (verbose_name, "s" & internal_name); save a_b, b_h, a_w; @@ -744,14 +660,16 @@ def punctum_char (expr verbose_name, internal_name, pickup pencircle scaled 0.6 linethickness; - draw_block ((-0.10 wd - linea_width / 2, - -linea_height / 2), - (-0.10 wd + linea_width / 2, - +linea_height / 2)); - draw_block ((+0.52 wd - linea_width / 2, - -linea_height / 2), - (+0.52 wd + linea_width / 2, - +linea_height / 2)); + draw_rounded_block ((-0.10 wd - linea_width / 2, + -linea_height / 2), + (-0.10 wd + linea_width / 2, + +linea_height / 2), + 0.6 linethickness); + draw_rounded_block ((+0.52 wd - linea_width / 2, + -linea_height / 2), + (+0.52 wd + linea_width / 2, + +linea_height / 2), + 0.6 linethickness); set_char_box (0, 0.62 wd# + linea_width#, linea_height# / 2, @@ -977,16 +895,21 @@ def epiphonus_char (expr verbose_name, internal_name, .. get_subpath (circle, dirs65, down, z6) -- cycle; - pickup pencircle scaled 0.6 linethickness; - save stem_bt; if left_stem: - z11 = (0.00 wd + 0.6 linethickness / 2, yoffs - 1.1 ht); - z12 = (0.00 wd + 0.6 linethickness / 2, yoffs); - draw_block ((0, yoffs - 1.1 ht - linethickness / 2), - (0.6 linethickness, yoffs)); + pickup pencircle scaled 0.6 linethickness; + + lft x11 = x1 - linethickness / 2; + bot y11 = yoffs - 1.1 ht - linethickness / 2; + x12 = x11; + y12 = y1; + + draw_rounded_block (bot lft z11, top rt z12, + 0.6 linethickness); stem_bt# = yoffs# - 1.1 ht#; + + labels (11, 12); else: stem_bt# = 0; fi; @@ -1000,7 +923,7 @@ enddef; def inclinatum_char (expr verbose_name, internal_name, small, stropha, auctum) = - fet_beginchar (verbose_name, "s" & internal_name) + fet_beginchar (verbose_name, "s" & internal_name); save ht, alpha; alpha := 35; @@ -1055,12 +978,12 @@ def inclinatum_char (expr verbose_name, internal_name, up, right, (0, 0))); - % the `eps' is necessary so that we don't get the - % start of a straight line in the diamond shape - fill get_subpath (diamond_shape, - dir (angle (z2 - z1) - eps), - dir (angle (z1 - z4) + eps), - (0, 0)) + % the addition or subtraction of `1' is necessary + % so that we get the right starting point + fill get_subpath_i (diamond_shape, + dir (angle (z2 - z1) - 1), + dir (angle (z1 - z4) + 1), + (0, 0)) -- get_subpath (stropha_ellipse, direction t_in of stropha_ellipse, direction t_out of stropha_ellipse, @@ -1100,12 +1023,12 @@ def inclinatum_char (expr verbose_name, internal_name, get_subpath (diamond_shape, up, right, (0, 0))); - % the `eps' is necessary so that we don't get the - % start of a straight line in the diamond shape - fill get_subpath (diamond_shape, - dir (angle (z2 - z1) - eps), - -dir (90 - off_angle), - (0, 0)) + % the addition or subtraction of `1' is necessary + % so that we get the right starting point + fill get_subpath_i (diamond_shape, + dir (angle (z2 - z1) - 1), + -dir (90 - off_angle), + (0, 0)) .. get_subpath (circle, dir (90 + alpha), -dir (90 + alpha), @@ -1123,27 +1046,27 @@ enddef; % punctum -punctum_char ("Ed. Vat. punctum", "vaticana.punctum", - false, false, false, false, - false, false, false, 1.0); +vat_punctum_char ("Ed. Vat. punctum", "vaticana.punctum", + false, false, false, false, + false, false, false, 1.0); % punctum cavum (for OpusTeX compatibility) -punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum", - false, true, false, false, - false, false, false, 1.0); +vat_punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum", + false, true, false, false, + false, false, false, 1.0); % linea punctum (for OpusTeX compatibility) -punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum", - true, false, false, false, - false, false, false, 1.0); +vat_punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum", + true, false, false, false, + false, false, false, 1.0); % linea punctum cavum (for OpusTeX compatibility) -punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum", - true, true, false, false, - false, false, false, 1.0); +vat_punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum", + true, true, false, false, + false, false, false, 1.0); % punctum inclinatum @@ -1152,21 +1075,21 @@ inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum", % pes lower punctum -punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes", - false, false, true, false, - true, false, false, 1.0); +vat_punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes", + false, false, true, false, + true, false, false, 1.0); % pes lower punctum -punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes", - false, false, true, false, - true, false, true, 1.0); +vat_punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes", + false, false, true, false, + true, false, true, 1.0); % pes upper punctum -punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes", - false, false, true, false, - false, false, false, 1.0); +vat_punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes", + false, false, true, false, + false, false, false, 1.0); % pes upper punctum (shifted variation) @@ -1175,15 +1098,15 @@ punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes", % 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", - false, false, true, false, - false, true, false, 1.0); +vat_punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes", + false, false, true, false, + false, true, false, 1.0); % small punctum as used in epiphonus -punctum_char ("Ed. Vat. plica", "vaticana.plica", - false, false, false, false, - false, false, false, 0.6); +vat_punctum_char ("Ed. Vat. plica", "vaticana.plica", + false, false, false, false, + false, false, false, 0.6); % small punctum as used in epiphonus @@ -1207,9 +1130,9 @@ epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus", % small punctum as used in cephalicus -punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica", - false, false, false, false, - true, false, false, 0.6); +vat_punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica", + false, false, false, false, + true, false, false, 0.6); % small punctum as used in cephalicus @@ -1228,7 +1151,7 @@ epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus", % quilisma -fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma") +fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma"); save a_b, b_h, a_w; a_b := 1.54; % b_h * a_b / a_w = wd / ht @@ -1248,14 +1171,14 @@ fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma") define_pixels (ht, wd); - pickup pencircle xscaled linethickness - yscaled 0.44 ht; - - save ellipse; + save ellipse, T; path ellipse; + transform T; - ellipse := reverse fullcircle xscaled linethickness - yscaled 0.44 ht; + T := identity xscaled linethickness + yscaled 0.44 ht; + pickup pencircle transformed T; + ellipse := reverse fullcircle transformed T; z1 = (rt 0.00 wd, top -0.28 ht); z2 = (0.11 wd, -0.14 ht); @@ -1287,15 +1210,15 @@ inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum", % solesmes punctum auctum ascendens -punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc", - false, false, false, true, - true, false, false, 1.0); +vat_punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc", + false, false, false, true, + true, false, false, 1.0); % solesmes punctum auctum descendens -punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc", - false, false, false, true, - false, false, false, 1.0); +vat_punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc", + false, false, false, true, + false, false, false, 1.0); % solesmes punctum inclinatum auctum @@ -1314,7 +1237,7 @@ inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta", % solesmes oriscus -fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus") +fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus"); save a_b, b_h, a_w; a_b := 1.54; % b_h * a_b / a_w = wd / ht @@ -1343,19 +1266,22 @@ fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus") z3 = (2/6 wd, -convexity); z4 = (0.50 wd - blot_diameter / 2, +convexity); - save height, ellipse; - path ellipse; + + save height; height = 2 ypart (directionpoint right of (z1 .. z2 .. z3 .. z4)); - pickup pencircle xscaled blot_diameter - yscaled (h + d - height); + save ellipse, T; + path ellipse; + transform T; - ellipse := fullcircle xscaled blot_diameter - yscaled (h + d - height); + T := identity xscaled blot_diameter + yscaled (h + d - height); + pickup pencircle transformed T; + ellipse := fullcircle transformed T; % Adjust vertical coordinates to touch bounding box. y1 := top -d; @@ -1391,13 +1317,13 @@ fet_endchar; % % inclinatum -fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum") +fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum"); draw_diamond_head (1.2 staff_space#, 0, 0, 35, false); fet_endchar; -def punctum_char (expr verbose_name, internal_name, - left_up_stem, left_down_stem) = +def med_punctum_char (expr verbose_name, internal_name, + left_up_stem, left_down_stem) = fet_beginchar (verbose_name, "s" & internal_name); save a, ht, wd; @@ -1416,50 +1342,63 @@ def punctum_char (expr verbose_name, internal_name, z1 = (0.00 wd + blot_diameter / 2, 0); z2 = (0.4 wd - blot_diameter / 2, 0); - fill get_subpath (ellipse, left, right, z1) - -- get_subpath (ellipse, right, left, z2) - -- cycle; - labels (1, 2); pickup pencircle scaled linethickness; if left_down_stem: - set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#); + z4 = (0.00 wd + linethickness / 2, -1.25 ht); + + fill get_subpath (ellipse, left, down, z1) + -- top lft z4{down} + .. z4{right} + .. top rt z4{up} + -- (rt x4, -.5 ht / 2) + -- get_subpath (ellipse, right, left, z2) + -- cycle; - z4 = (0.00 wd + linethickness / 2, blot_diameter / 2); - z5 = (0.00 wd + linethickness / 2, -1.25 ht); + labels (4); - draw_block (lft z5, rt z4); + set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#); elseif left_up_stem: - set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#); + z4 = (0.00 wd + linethickness / 2, +1.25 ht); + + fill get_subpath (ellipse, down, right, z1) + -- get_subpath (ellipse, right, left, z2) + -- (rt x4, .5 ht / 2) + -- bot rt z4{up} + .. z4{left} + .. bot lft z4{down} + -- cycle; - z4 = (0.00 wd + linethickness / 2, blot_diameter / 2); - z5 = (0.00 wd + linethickness / 2, +1.25 ht); + labels (4); - draw_block (lft z4, rt z5); + set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#); else: + fill get_subpath (ellipse, left, right, z1) + -- get_subpath (ellipse, right, left, z2) + -- cycle; + set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#); fi; - labels (4, 5); fet_endchar; enddef; % punctum -punctum_char ("Ed. Med. punctum", "medicaea.punctum", - false, false); +med_punctum_char ("Ed. Med. punctum", "medicaea.punctum", + false, false); % left up-stemmed punctum -punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga", - true, false); +med_punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga", + true, false); % virga (i.e. left down-stemmed punctum) -punctum_char ("Ed. Med. virga", "medicaea.virga", - false, true); +med_punctum_char ("Ed. Med. virga", "medicaea.virga", + false, true); %%%%%%%% @@ -1471,8 +1410,8 @@ punctum_char ("Ed. Med. virga", "medicaea.virga", % % -def punctum_char (expr verbose_name, internal_name, - down_stem) = +def huf_punctum_char (expr verbose_name, internal_name, + down_stem) = fet_beginchar (verbose_name, "s" & internal_name); save alpha; @@ -1497,7 +1436,7 @@ def punctum_char (expr verbose_name, internal_name, fill get_subpath (ellipse, up, down, z11) -- get_subpath (ellipse, down, up, z12) - --cycle; + -- cycle; labels (11, 12); fi; @@ -1506,11 +1445,11 @@ enddef; % punctum -punctum_char ("Hufnagel punctum", "hufnagel.punctum", false) +huf_punctum_char ("Hufnagel punctum", "hufnagel.punctum", false) % virga -punctum_char ("Hufnagel virga", "hufnagel.virga", true) +huf_punctum_char ("Hufnagel virga", "hufnagel.virga", true) % pes lower punctum @@ -1550,4 +1489,4 @@ fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes") fet_endchar; -fet_endgroup ("noteheads") +fet_endgroup ("noteheads");