1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-heads.mf -- implement ancient note heads
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 2001--2006 Juergen Reuter <reuter@ipd.uka.de>
8 % Neo-mensural heads originally by
9 % Christian Mondrup and Mats Bengtsson
12 save black_notehead_width;
13 numeric black_notehead_width;
15 fet_begingroup ("noteheads")
20 % The head is assumed to be vertically centered around (0, 0).
21 % The left-most edge of the head should touch the vertical line
22 % that goes though the point (0, 0).
24 % set_char_box() conventions:
26 % * breapth: Ignored (as far as I know). Should be set to 0.
28 % * width: Should match the head's width.
30 % * depth: Should match the bottom edge of the head. Affects vertical
33 % * height: Should match the top edge of the head. Affects vertical
36 % TODO: should depth/height include appendages/stems?
39 noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
40 define_pixels (noteheight);
52 def draw_neomensural_brevis (expr brevwid) =
53 save beamheight, head_width;
54 save holeheight, stem_width;
55 save serif_size, serif_protrude;
57 head_width# = brevwid;
58 holeheight = 3 stafflinethickness;
59 stem_width = 1.4 stafflinethickness;
61 define_pixels (head_width);
63 set_char_box (0, head_width#,
64 noteheight# / 2, noteheight# / 2);
66 2 beamheight + holeheight = noteheight;
67 serif_size = (holeheight - stafflinethickness) / 2;
68 serif_protrude = 1.5 serif_size;
71 z2l = (0, -stafflinethickness / 2);
72 z3r = z2r + serif_size * (1, -1);
75 z5l = z3l + (-serif_size, -serif_protrude);
77 penpos1 (stem_width, 0);
78 penpos2 (stem_width, 0);
79 penpos3 (beamheight, 90);
80 penpos4 (beamheight, 90);
81 penpos5 (stem_width, 180);
92 -- reverse pat_out yscaled -1;
94 -- reverse pat_out shifted (-x4r, 0)
105 -- reverse pat_in yscaled -1;
107 -- reverse pat_in shifted (-x4r, 0)
113 penlabels (1, 2, 3, 4, 5);
117 %%% This head does not seem to be used anywhere. Junk me? -- jr
118 def draw_neomensural_left_stemmed_head (expr wid) =
119 draw_neomensural_brevis (wid);
121 x6 = x7 = stem_width / 2;
123 y7 = y5 - 2.25 staff_space;
125 z17 = (x7, y7 - stem_width / 2);
127 penpos6 (stem_width, 0);
128 penpos7 (stem_width, 0);
142 %%% This head does not seem to be used anywhere. Junk me? -- jr
143 fet_beginchar ("Left stemmed notehead", "slneomensural");
144 draw_neomensural_left_stemmed_head (2 staff_space#);
149 % Some sources (eg. Musix/OpusTeX) think that the appendage should be on
150 % the left, some say right. Right wins democratically.
152 def draw_neomensural_longa (expr wid) =
153 draw_neomensural_brevis (wid);
159 z6 - z7 = (stem_width / 2, -staff_space);
160 theta = angle (z6 - z7) + 90;
162 penpos7 (stem_width, 0);
163 penpos6 (1.2 stem_width, theta);
165 z7' = find_tangent (z6l, pat_out,
166 (x7l + 0.5 stem_width, y7l),
167 (x7l - 0.5 stem_width, y7l));
181 % En wij presenteren U: de opvolgster van Emily
185 fet_beginchar ("Neo-mensural maxima notehead", "s-3neomensural");
186 draw_neomensural_longa (2.6 staff_space#);
190 fet_beginchar ("Neo-mensural longa notehead", "s-2neomensural");
191 draw_neomensural_longa (2 staff_space#);
195 fet_beginchar ("Neo-mensural brevis notehead", "s-1neomensural");
196 draw_neomensural_brevis (2 staff_space#);
200 def draw_neomensural_black_head (expr wid, height) =
202 save ne, nw, ne_dist, nw_dist;
203 pair ne, nw, ne_dist, nw_dist;
207 set_char_box (0, head_width#,
208 height / 2, height / 2);
210 charwx := head_width# / 2;
211 charwy := height / 2;
214 x2 = x4 = (x1 + x3) / 2;
216 pickup pencircle scaled blot_diameter;
223 ne := unitvector (z2 - z1);
224 nw_dist := (ne rotated 90) * 0.5 blot_diameter;
225 nw := unitvector (z2 - z3);
226 ne_dist := (nw rotated -90) * 0.5 blot_diameter;
229 .. (z1 + nw_dist){ne}
230 -- (z2 + nw_dist){ne}
232 .. (z2 + ne_dist){-nw}
233 -- (z3 + ne_dist){-nw}
235 .. (z3 - nw_dist){-ne}
236 -- (z4 - nw_dist){-ne}
238 .. (z4 - ne_dist){nw}
239 -- (z1 - ne_dist){nw}
246 def draw_neomensural_open_head (expr wid, height)=
247 draw_neomensural_black_head (wid, height);
251 diamNW = length (z2 - z1) + blot_diameter;
252 diamSW = length (z4 - z1) + blot_diameter;
254 save hole_widthNW, hole_widthSW;
256 hole_widthNW = 0.34 diamNW ;
257 hole_widthSW + 2.6 linethickness = diamSW;
259 (z7 + z5) / 2 = (w / 2, 0);
260 (z8 + z6) / 2 = (w / 2, 0);
261 z6 - z5 = hole_widthNW * unitvector (z2 - z1);
262 z7 - z6 = hole_widthSW * unitvector (z4 - z1);
275 % WL says the thin lines should be thinner.
277 fet_beginchar ("Harmonic notehead (Neo-mensural open)", "s0harmonic");
278 draw_neomensural_open_head (1.3 staff_space#, 1.3 noteheight#);
279 charwx := head_width#;
284 fet_beginchar ("Harmonic notehead (Neo-mensural black)", "s2harmonic");
285 draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#);
286 charwx := head_width#;
291 fet_beginchar ("Neo-mensural semibrevis head", "s0neomensural");
292 draw_neomensural_open_head (staff_space#, noteheight#);
296 fet_beginchar ("Neo-mensural minima head", "s1neomensural");
297 draw_neomensural_open_head (staff_space#, noteheight#);
301 fet_beginchar ("Neo-mensural semiminima head", "s2neomensural");
302 draw_neomensural_black_head (staff_space#, noteheight#);
306 def draw_mensural_brevis (expr wid) =
307 % TODO. For the moment, fall back to draw_neomensural_brevis.
308 draw_neomensural_brevis (wid);
312 %%% This head does not seem to be used anywhere. Junk me? -- jr
313 def draw_mensural_left_stemmed_head (expr wid) =
314 draw_mensural_brevis (wid);
316 x6 = x7 = stem_width / 2;
318 y7 = y5 - 2.25 staff_space;
320 z17 = (x7, y7 - stem_width / 2);
322 penpos6 (stem_width, 0);
323 penpos7 (stem_width, 0);
337 def draw_mensural_longa (expr wid) =
338 draw_mensural_brevis (wid);
340 x6 = x7 = head_width - stem_width / 2;
342 y7 = y5 - 2.25 staff_space;
344 z17 = (x7, y7 - stem_width / 2);
346 penpos6 (stem_width, 0);
347 penpos7 (stem_width, 0);
361 %%% This head does not seem to be used anywhere. Junk me? -- jr
362 fet_beginchar ("Mensural left stemmed notehead", "slmensural");
363 draw_mensural_left_stemmed_head (staff_space#);
367 fet_beginchar ("Mensural maxima notehead", "s-3mensural");
368 draw_mensural_longa (2.0 staff_space#);
372 fet_beginchar ("Mensural longa notehead", "s-2mensural");
373 draw_mensural_longa (staff_space#);
377 fet_beginchar ("Mensural brevis notehead", "s-1mensural");
378 draw_mensural_brevis (staff_space#);
382 def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
383 save head_width, head_height;
384 save ellipse, ellipse_r;
385 path ellipse, ellipse_r, diamond_shape;
387 head_height# = head_h;
388 head_width# / head_height# = tand (angle);
390 set_char_box (0, head_width#,
391 head_height# / 2, head_height# / 2);
393 charwx := head_width# / 2;
394 charwy := head_height# / 2 - linethickness#;
396 define_pixels (head_width, head_height);
398 ellipse := reverse fullcircle
399 xscaled (max (blot_diameter, pen_w * head_width))
400 yscaled (max (blot_diameter, pen_h * head_width))
403 z1 = find_tangent_shift (((0, h) -- (0, -h)), ellipse,
405 z2 = find_tangent_shift (((0, h) -- (w, h)), ellipse,
406 (w / 2, h), (w / 2, 0));
407 z3 = find_tangent_shift (((w, h) -- (w, -h)), ellipse,
409 z4 = find_tangent_shift (((0, -h) -- (w, -h)), ellipse,
410 (w / 2, -h), (w / 2, 0));
412 diamond_shape := get_subpath (ellipse, z1 - z4, z2 - z1, z1)
413 -- get_subpath (ellipse, z2 - z1, z3 - z2, z2)
414 -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
415 -- get_subpath (ellipse, z4 - z3, z1 - z4, z4)
423 l12 := (directionpoint (z1 - z2) of ellipse) shifted z1
424 -- (directionpoint (z1 - z2) of ellipse) shifted z2;
425 l23 := (directionpoint (z2 - z3) of ellipse) shifted z2
426 -- (directionpoint (z2 - z3) of ellipse) shifted z3;
427 l34 := (directionpoint (z3 - z4) of ellipse) shifted z3
428 -- (directionpoint (z3 - z4) of ellipse) shifted z4;
429 l41 := (directionpoint (z4 - z1) of ellipse) shifted z4
430 -- (directionpoint (z4 - z1) of ellipse) shifted z1;
432 unfill l12 intersectionpoint l23
433 -- l23 intersectionpoint l34
434 -- l34 intersectionpoint l41
435 -- l41 intersectionpoint l12
443 fet_beginchar ("Mensural semibrevis head", "s0mensural");
444 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
448 fet_beginchar ("Mensural minima head", "s1mensural");
449 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
453 fet_beginchar ("Mensural semiminima head", "s2mensural");
454 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
458 fet_beginchar ("Petrucci semibrevis head", "s0petrucci");
459 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
460 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
464 fet_beginchar ("Petrucci minima head", "s1petrucci");
465 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
466 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
470 fet_beginchar ("Petrucci semiminima head", "s2petrucci");
471 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, false);
472 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
480 % EDITIO VATICANA (including solesmes extensions)
485 def punctum_char (expr verbose_name, internal_name,
486 linea, cavum, straight, auctum,
487 d_up, up_shift, down_shift, mag) =
488 fet_beginchar (verbose_name, "s" & internal_name);
491 a_b := 1.54; % b_h * a_b / a_w = wd / ht
495 save a, beta, ht, wd;
497 ht# = noteheight# * mag;
501 black_notehead_width# := wd#;
515 % convexity and eccentricity
516 save u_convexity, u_eccentricity;
519 u_convexity# := -0.01 ht#;
520 u_eccentricity# := 0.0 ht#; % dummy
522 u_convexity# := -0.03 ht#;
523 u_eccentricity# := +0.25 ht#;
525 u_convexity# := -0.05 ht#;
526 u_eccentricity# := 0.0 ht#; % dummy
529 save convexity, eccentricity;
531 convexity# := d_sign * u_convexity#;
532 eccentricity# := d_sign * u_eccentricity#;
545 define_pixels (convexity, eccentricity, yoffs, ht, wd);
547 pickup pencircle scaled linethickness;
549 save height, yoffs_bt, p, circle, circle_r;
550 path p, circle, circle_r;
553 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
555 define_pixels (height, yoffs_bt);
557 circle := fullcircle scaled linethickness;
566 save box_top, box_bt;
569 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
570 z2 = (0.21 wd, yoffs_bt + convexity);
571 z3 = (0.42 wd - linethickness/ 2,
572 yoffs_bt + eccentricity);
573 box_top# = height# + yoffs_bt# +
574 max (0, convexity#, eccentricity#);
575 box_bt# = yoffs_bt# +
576 min (0, convexity#, eccentricity#);
585 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
586 z2 = (0.21 wd, yoffs_bt + convexity);
587 z3 = (0.42 wd - linethickness / 2, yoffs_bt);
588 box_top# = height# + yoffs_bt# + max (0, convexity#);
589 box_bt# = yoffs_bt# + min (0, convexity#);
599 labels (1, 2, 3, 4, 5, 6);
604 dirs12 := direction (0 + epsilon) of p;
605 dirs2 := direction 1 of p;
606 dirs32 := direction (2 - epsilon) of p;
607 dirs45 := direction (3 + epsilon) of p;
608 dirs5 := direction 4 of p;
609 dirs65 := direction (5 - epsilon) of p;
611 fill get_subpath (circle, down, dirs12, z1)
613 .. get_subpath (circle, dirs32, up, z3)
614 -- get_subpath (circle, up, dirs45, z4)
616 .. get_subpath (circle, dirs65, down, z6)
624 pat123 := ((directionpoint -dirs12 of circle)
627 .. {dirs32}((directionpoint -dirs32 of circle)
631 pat456 := ((directionpoint -dirs45 of circle)
634 .. {dirs65}((directionpoint -dirs65 of circle)
639 t61 := ypart (pat61 intersectiontimes pat123);
640 t12 := xpart (pat123 intersectiontimes pat34);
641 t34 := ypart (pat34 intersectiontimes pat456);
642 t45 := xpart (pat456 intersectiontimes pat61);
644 unfill subpath (t61, t12) of pat123
645 -- subpath (t34, t45) of pat456
649 set_char_box (0.00 wd#, 0.42 wd#,
650 max (0, -box_bt#) + linethickness# / 2,
651 max (0, box_top#) + linethickness# / 2);
654 save linea_width, linea_height;
656 linea_width# = 0.6 linethickness#;
657 linea_height# = 0.7 ht#;
659 define_pixels (linea_width, linea_height);
661 pickup pencircle scaled 0.6 linethickness;
663 draw_block ((-0.10 wd - linea_width / 2,
665 (-0.10 wd + linea_width / 2,
667 draw_block ((+0.52 wd - linea_width / 2,
669 (+0.52 wd + linea_width / 2,
672 set_char_box (0, 0.62 wd# + linea_width#,
676 currentpicture := currentpicture
677 shifted (0.10 wd + linea_width / 2, 0);
683 def plica_char (expr verbose_name, internal_name,
685 fet_beginchar (verbose_name, "s" & internal_name);
688 a_b := 1.54; % b_h * a_b / a_w = wd / ht
692 save a, beta, ht, wd;
694 ht# = noteheight# * mag;
698 black_notehead_width# := wd#;
712 % convexity and eccentricity
713 save convexity, eccentricity;
715 convexity# := d_sign * -0.10 ht#;
716 eccentricity# := d_sign * -0.12 ht#;
723 define_pixels (convexity, eccentricity, yoffs, ht, wd);
725 pickup pencircle scaled linethickness;
727 save height, yoffs_bt, p, circle, circle_r;
728 path p, circle, circle_r;
731 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
733 define_pixels (height, yoffs_bt);
735 circle := fullcircle scaled linethickness;
744 save box_top, box_bt;
746 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
747 z2 = (0.21 wd, yoffs_bt + convexity);
748 z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
749 box_top# = height# + yoffs_bt# +
750 max (0, convexity#, eccentricity#);
751 box_bt# = yoffs_bt# +
752 min (0, convexity#, eccentricity#);
761 labels (1, 2, 3, 4, 5, 6);
766 dirs12 := direction (0 + epsilon) of p;
767 dirs2 := direction 1 of p;
768 dirs32 := direction (2 - epsilon) of p;
769 dirs45 := direction (3 + epsilon) of p;
770 dirs5 := direction 4 of p;
771 dirs65 := direction (5 - epsilon) of p;
773 fill get_subpath (circle, down, dirs12, z1)
775 .. get_subpath (circle, dirs32, up, z3)
776 -- get_subpath (circle, up, dirs45, z4)
778 .. get_subpath (circle, dirs65, down, z6)
781 pickup pencircle scaled 0.6 linethickness;
785 set_char_box (0.00 wd#, 0.42 wd#,
786 max (0, -box_bt#) + linethickness# / 2,
787 max (0, box_top#) + linethickness# / 2);
793 def epiphonus_char (expr verbose_name, internal_name,
794 left_stem, d_up, down_shift, mag) =
795 fet_beginchar (verbose_name, "s" & internal_name);
798 a_b := 1.54; % b_h * a_b / a_w = wd / ht
802 save a, beta, ht, wd;
804 ht# = noteheight# * mag;
808 black_notehead_width# := wd#;
822 % convexity and eccentricity
825 convexity# := d_sign * -0.05ht#;
836 define_pixels (convexity, yoffs, ht, wd);
838 pickup pencircle scaled linethickness;
840 save height, yoffs_bt, p, circle, circle_r;
841 path p, circle, circle_r;
844 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
846 define_pixels (height, yoffs_bt);
848 circle := fullcircle scaled linethickness;
857 save box_top, box_bt;
859 z1 = (0.00 wd + linethickness / 2, yoffs_bt - 2.5 convexity);
860 z2 = (0.06 wd, yoffs_bt + 1.4 convexity);
861 z3 = (0.42 wd - linethickness / 2, yoffs_bt - 1.0 convexity);
862 box_top# = height# + yoffs_bt# +
863 max (-1.0 convexity#, 1.4 convexity#, 0);
864 box_bt# = yoffs_bt# +
865 min (-1.0 convexity#, 1.4 convexity#, 0);
874 labels (1, 2, 3, 4, 5, 6);
879 dirs12 := direction (0 + epsilon) of p;
880 dirs21 := direction (1 - epsilon) of p;
881 dirs23 := direction (1 + epsilon) of p;
882 dirs32 := direction (2 - epsilon) of p;
883 dirs45 := direction (3 + epsilon) of p;
884 dirs54 := direction (4 - epsilon) of p;
885 dirs56 := direction (4 + epsilon) of p;
886 dirs65 := direction (5 - epsilon) of p;
888 fill get_subpath (circle, down, dirs12, z1)
889 .. get_subpath (circle, dirs21, dirs23, z2)
890 .. get_subpath (circle, dirs32, up, z3)
891 -- get_subpath (circle, up, dirs45, z4)
892 .. get_subpath (circle, dirs54, dirs56, z5)
893 .. get_subpath (circle, dirs65, down, z6)
896 pickup pencircle scaled 0.6 linethickness;
901 z11 = (0.00 wd + 0.6 linethickness / 2, yoffs - 1.1 ht);
902 z12 = (0.00 wd + 0.6 linethickness / 2, yoffs);
903 draw_block ((0, yoffs - 1.1 ht - linethickness / 2),
904 (0.6 linethickness, yoffs));
905 stem_bt# = yoffs# - 1.1 ht#;
910 set_char_box (0.00 wd#, 0.42 wd#,
911 max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
912 max (0, box_top#) + linethickness# / 2);
917 def inclinatum_char (expr verbose_name, internal_name,
918 small, stropha, auctum) =
919 fet_beginchar (verbose_name, "s" & internal_name)
925 ht# = 0.50 noteheight#;
927 ht# = 0.80 noteheight#;
930 draw_diamond_head (ht#, 0, 0, alpha, false);
934 off_angle := alpha + 15;
936 save stropha_ellipse, auctum_hook, circle;
937 path stropha_ellipse, auctum_hook, circle;
939 circle := reverse fullcircle scaled linethickness;
941 stropha_ellipse := fullcircle xscaled 0.25 head_height
942 yscaled 0.55 head_height
946 + linethickness / 2 * dir (180 - off_angle)
947 - directionpoint dir (90 - off_angle)
949 z12 = directionpoint -dir (90 - off_angle) of diamond_shape +
950 linethickness / 2 * dir (180 - off_angle);
951 z13 = (0, -0.5 head_height + linethickness);
953 auctum_hook := z12{-dir (90 - off_angle)}
954 .. {dir (90 + alpha)}z13;
958 if (stropha and not auctum):
963 t_in := xpart ((stropha_ellipse shifted z11)
965 get_subpath (diamond_shape,
968 t_out := xpart ((stropha_ellipse shifted z11)
970 get_subpath (diamond_shape,
974 % the addition or subtraction of `1' is necessary
975 % so that we get the right starting point
976 fill get_subpath_i (diamond_shape,
977 dir (angle (z2 - z1) - 1),
978 dir (angle (z1 - z4) + 1),
980 -- get_subpath (stropha_ellipse,
981 direction t_in of stropha_ellipse,
982 direction t_out of stropha_ellipse,
989 if (auctum and not stropha):
992 fill get_subpath (diamond_shape,
994 -dir (90 - off_angle),
996 .. get_subpath (circle,
1000 .. get_subpath (circle,
1001 dir (90 - off_angle),
1009 if (auctum and stropha):
1014 t := xpart ((stropha_ellipse shifted z11)
1016 get_subpath (diamond_shape, up, right,
1019 % the addition or subtraction of `1' is necessary
1020 % so that we get the right starting point
1021 fill get_subpath_i (diamond_shape,
1022 dir (angle (z2 - z1) - 1),
1023 -dir (90 - off_angle),
1025 .. get_subpath (circle,
1029 .. get_subpath (stropha_ellipse,
1030 dir (90 - off_angle),
1031 direction t of stropha_ellipse,
1042 punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
1043 false, false, false, false,
1044 false, false, false, 1.0);
1047 % punctum cavum (for OpusTeX compatibility)
1048 punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
1049 false, true, false, false,
1050 false, false, false, 1.0);
1053 % linea punctum (for OpusTeX compatibility)
1054 punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
1055 true, false, false, false,
1056 false, false, false, 1.0);
1059 % linea punctum cavum (for OpusTeX compatibility)
1060 punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
1061 true, true, false, false,
1062 false, false, false, 1.0);
1065 % punctum inclinatum
1066 inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum",
1067 false, false, false);
1071 punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
1072 false, false, true, false,
1073 true, false, false, 1.0);
1077 punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
1078 false, false, true, false,
1079 true, false, true, 1.0);
1083 punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes",
1084 false, false, true, false,
1085 false, false, false, 1.0);
1088 % pes upper punctum (shifted variation)
1090 % This note head is used instead of the regular pes upper punctum to
1091 % avoid collision with the lower punctum note of the pes when the upper
1092 % punctum sits directly on top of the lower punctum.
1094 punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
1095 false, false, true, false,
1096 false, true, false, 1.0);
1099 % small punctum as used in epiphonus
1100 punctum_char ("Ed. Vat. plica", "vaticana.plica",
1101 false, false, false, false,
1102 false, false, false, 0.6);
1105 % small punctum as used in epiphonus
1106 plica_char ("Ed. Vat. var plica", "vaticana.vplica",
1110 % eccentric punctum as used in epiphonus
1111 epiphonus_char ("Ed. Vat. epiphonus", "vaticana.epiphonus",
1112 false, true, false, 1.0);
1115 % eccentric punctum as used in epiphonus (shifted variation)
1117 % This note head is used instead of the regular epiphonus punctum to
1118 % avoid collision with the plica head when the plica sits directly on
1119 % top of the lower head.
1121 epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
1122 false, true, true, 1.0);
1125 % small punctum as used in cephalicus
1126 punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
1127 false, false, false, false,
1128 true, false, false, 0.6);
1131 % small punctum as used in cephalicus
1132 plica_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
1136 % eccentric punctum as used in cephalicus; without left stem
1137 epiphonus_char ("Ed. Vat. inner cephalicus", "vaticana.inner.cephalicus",
1138 false, false, false, 1.0);
1141 % eccentric punctum as used in cephalicus; with left stem
1142 epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
1143 true, false, false, 1.0);
1147 fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma")
1150 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1154 save a, beta, ht, wd;
1161 set_char_box (0, 0.42 wd#, 0.28 ht#, 0.36 ht#);
1163 black_notehead_width# := wd#;
1165 define_pixels (ht, wd);
1167 pickup pencircle xscaled linethickness
1173 ellipse := reverse fullcircle xscaled linethickness
1176 z1 = (rt 0.00 wd, top -0.28 ht);
1177 z2 = (0.11 wd, -0.14 ht);
1178 z3 = (0.12 wd, +0.03 ht);
1179 z4 = (0.25 wd, -0.09 ht);
1180 z5 = (0.25 wd, +0.08 ht);
1181 z6 = (lft 0.42 wd, -0.04 ht);
1182 z7 = (lft 0.40 wd, bot +0.36 ht);
1184 fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
1185 -- get_subpath (ellipse, z2 - z1, z1 - z2, z2)
1187 fill get_subpath (ellipse, z3 - z4, z4 - z3, z3)
1188 -- get_subpath (ellipse, z4 - z3, z3 - z4, z4)
1190 fill get_subpath (ellipse, z5 - z6, z6 - z5, z5)
1191 -- point 0 of get_subpath (ellipse, z6 - z5, z5 - z6, z6)
1192 -- get_subpath (ellipse, z7 - z6, z6 - z7, z7)
1193 -- get_subpath (ellipse, z6 - z7, z5 - z6, z6)
1196 labels (1, 2, 3, 4, 5, 6, 7);
1200 % solesmes punctum inclinatum parvum
1201 inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum",
1202 true, false, false);
1205 % solesmes punctum auctum ascendens
1206 punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
1207 false, false, false, true,
1208 true, false, false, 1.0);
1211 % solesmes punctum auctum descendens
1212 punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
1213 false, false, false, true,
1214 false, false, false, 1.0);
1217 % solesmes punctum inclinatum auctum
1218 inclinatum_char ("Solesmes punctum incl. auctum", "solesmes.incl.auctum",
1219 false, false, true);
1223 inclinatum_char ("Solesmes stropha", "solesmes.stropha",
1224 false, true, false);
1227 % solesmes stropha aucta
1228 inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta",
1233 fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus")
1236 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1240 save a, beta, ht, wd;
1246 black_notehead_width# := wd#;
1250 convexity# = +0.05 ht#;
1252 define_pixels (ht, wd, convexity);
1254 set_char_box (0.00 wd#, 0.50 wd#,
1255 0.25 ht# + convexity#, 0.25 ht# + convexity#);
1257 z1 = (0.00 wd + blot_diameter / 2, -convexity);
1258 z2 = (1/6 wd, +convexity);
1259 z3 = (2/6 wd, -convexity);
1260 z4 = (0.50 wd - blot_diameter / 2, +convexity);
1262 save height, ellipse;
1265 height = 2 ypart (directionpoint right of (z1
1270 pickup pencircle xscaled blot_diameter
1271 yscaled (h + d - height);
1273 ellipse := fullcircle xscaled blot_diameter
1274 yscaled (h + d - height);
1276 % Adjust vertical coordinates to touch bounding box.
1283 d_ := direction 0 of (z1
1288 fill get_subpath (ellipse, -d_, d_, z1)
1291 .. get_subpath (ellipse, d_, -d_, z4)
1296 labels (1, 2, 3, 4);
1310 fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum")
1311 draw_diamond_head (1.2 staff_space#, 0, 0, 35, false);
1315 def punctum_char (expr verbose_name, internal_name,
1316 left_up_stem, left_down_stem) =
1317 fet_beginchar (verbose_name, "s" & internal_name);
1320 ht# = 2 staff_space#;
1322 black_notehead_width# := wd#;
1324 define_pixels (ht, wd);
1329 ellipse := fullcircle xscaled blot_diameter
1332 z1 = (0.00 wd + blot_diameter / 2, 0);
1333 z2 = (0.4 wd - blot_diameter / 2, 0);
1335 fill get_subpath (ellipse, left, right, z1)
1336 -- get_subpath (ellipse, right, left, z2)
1341 pickup pencircle scaled linethickness;
1344 set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
1346 z4 = (0.00 wd + linethickness / 2, blot_diameter / 2);
1347 z5 = (0.00 wd + linethickness / 2, -1.25 ht);
1349 draw_block (lft z5, rt z4);
1350 elseif left_up_stem:
1351 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
1353 z4 = (0.00 wd + linethickness / 2, -blot_diameter / 2);
1354 z5 = (0.00 wd + linethickness / 2, +1.25 ht);
1356 draw_block (lft z4, rt z5);
1358 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#);
1367 punctum_char ("Ed. Med. punctum", "medicaea.punctum",
1371 % left up-stemmed punctum
1372 punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
1376 % virga (i.e. left down-stemmed punctum)
1377 punctum_char ("Ed. Med. virga", "medicaea.virga",
1390 def punctum_char (expr verbose_name, internal_name,
1392 fet_beginchar (verbose_name, "s" & internal_name);
1397 draw_diamond_head (staff_space#, 0, 0, alpha, false);
1400 set_char_box (0, head_width#,
1401 1.5 staff_space#, head_height# / 2);
1406 ellipse := reverse fullcircle xscaled blot_diameter
1407 yscaled 0.7 staff_space
1410 z11 = (head_width / 2, 0);
1411 z12 = find_tangent_shift (((0, -d) -- (w, -d)), ellipse,
1412 (w / 2, -d), (w / 2, 0));
1414 fill get_subpath (ellipse, up, down, z11)
1415 -- get_subpath (ellipse, down, up, z12)
1425 punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
1429 punctum_char ("Hufnagel virga", "hufnagel.virga", true)
1433 fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes")
1434 save width, height, alpha;
1436 width# = 2 * staff_space#;
1437 height# = 0.7 * staff_space#;
1440 set_char_box (0, width#, height# / 2, height# / 2);
1442 define_pixels (width, height);
1447 circle := reverse fullcircle scaled linethickness;
1449 pickup pencircle scaled linethickness;
1451 rt x3 = -lft x1 = width / 2;
1452 y2 = y3 = height / 2;
1453 y1 = y4 = -height / 2;
1455 tand (alpha) * (y2 - y1) = x2 - x1 = x3 - x4;
1457 fill get_subpath (circle, left, z2 - z1, z1)
1458 -- get_subpath (circle, z2 - z1, right, z2)
1459 -- get_subpath (circle, right, z4 - z3, z3)
1460 -- get_subpath (circle, z4 - z3, left, z4)
1463 currentpicture := currentpicture shifted (width/2, 0);
1465 % labels (1, 2, 3, 4);
1469 fet_endgroup ("noteheads")