1 % Feta (not the Font-En-Tja) music font -- ancient note heads
2 % This file is part of LilyPond, the GNU music typesetter.
4 % Copyright (C) 2001--2011 Juergen Reuter <reuter@ipd.uka.de>
6 % Neo-mensural heads originally by
7 % Christian Mondrup and Mats Bengtsson
10 % LilyPond is free software: you can redistribute it and/or modify
11 % it under the terms of the GNU General Public License as published by
12 % the Free Software Foundation, either version 3 of the License, or
13 % (at your option) any later version.
15 % LilyPond is distributed in the hope that it will be useful,
16 % but WITHOUT ANY WARRANTY; without even the implied warranty of
17 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 % GNU General Public License for more details.
20 % You should have received a copy of the GNU General Public License
21 % along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
23 save black_notehead_width;
24 numeric black_notehead_width;
26 fet_begingroup ("noteheads");
31 % The head is assumed to be vertically centered around (0, 0).
32 % The left-most edge of the head should touch the vertical line
33 % that goes though the point (0, 0).
35 % set_char_box() conventions:
37 % * breapth: Ignored (as far as I know). Should be set to 0.
39 % * width: Should match the head's width.
41 % * depth: Should match the bottom edge of the head. Affects vertical
44 % * height: Should match the top edge of the head. Affects vertical
47 % TODO: should depth/height include appendages/stems?
49 save overdone_heads, noteheight;
52 noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
53 define_pixels (noteheight);
65 def draw_neomensural_brevis (expr brevwid, open, full) =
66 save beamheight, head_width;
67 save holeheight, stem_width;
68 save serif_size, serif_protrude;
70 head_width# = brevwid;
71 holeheight = 3 stafflinethickness;
72 stem_width = 1.4 stafflinethickness;
74 define_pixels (head_width);
76 set_char_box (0, head_width#,
77 noteheight# / 2, noteheight# / 2);
79 2 beamheight + holeheight = noteheight;
80 serif_size = (holeheight - stafflinethickness) / 2;
81 serif_protrude = 1.5 serif_size;
84 z2l = (0, -stafflinethickness / 2);
85 z3r = z2r + serif_size * (1, -1);
88 z5l = z3l + (-serif_size, -serif_protrude);
90 penpos1 (stem_width, 0);
91 penpos2 (stem_width, 0);
92 penpos3 (beamheight, 90);
93 penpos4 (beamheight, 90);
94 penpos5 (stem_width, 180);
105 -- reverse pat_out yscaled -1;
107 -- reverse pat_out shifted (-x4r, 0)
122 -- reverse pat_in yscaled -1;
125 -- reverse pat_in shifted (-x4r, 0)
134 penlabels (1, 2, 3, 4, 5);
138 %%% This head does not seem to be used anywhere. Junk me? -- jr
139 def draw_neomensural_left_stemmed_head (expr wid) =
140 draw_neomensural_brevis (wid, true, true);
142 x6 = x7 = stem_width / 2;
144 y7 = y5 - 2.25 staff_space;
146 z17 = (x7, y7 - stem_width / 2);
148 penpos6 (stem_width, 0);
149 penpos7 (stem_width, 0);
163 %%% This head does not seem to be used anywhere. Junk me? -- jr
164 fet_beginchar ("Left stemmed notehead", "slneomensural");
165 draw_neomensural_left_stemmed_head (2 staff_space#);
170 % Some sources (eg. Musix/OpusTeX) think that the appendage should be on
171 % the left, some say right. Right wins democratically.
173 def draw_neomensural_longa (expr wid) =
174 draw_neomensural_brevis (wid, true, true);
180 z6 - z7 = (stem_width / 2, -staff_space);
181 theta = angle (z6 - z7) + 90;
183 penpos7 (stem_width, 0);
184 penpos6 (1.2 stem_width, theta);
186 z7' = find_tangent (z6l, pat_out,
187 (x7l + 0.5 stem_width, y7l),
188 (x7l - 0.5 stem_width, y7l));
202 % En wij presenteren U: de opvolgster van Emily
206 fet_beginchar ("Neo-mensural maxima notehead", "sM3neomensural");
207 draw_neomensural_longa (2.6 staff_space#);
211 fet_beginchar ("Neo-mensural longa notehead", "sM2neomensural");
212 draw_neomensural_longa (2 staff_space#);
216 fet_beginchar ("Neo-mensural brevis notehead", "sM1neomensural");
217 draw_neomensural_brevis (2 staff_space#, true, true);
221 def draw_neomensural_black_head (expr wid, height) =
223 save ne, nw, ne_dist, nw_dist;
224 pair ne, nw, ne_dist, nw_dist;
228 set_char_box (0, head_width#,
229 height / 2, height / 2);
231 charwx := head_width# / 2;
232 charwy := height / 2;
235 x2 = x4 = (x1 + x3) / 2;
237 pickup pencircle scaled blot_diameter;
244 ne := unitvector (z2 - z1);
245 nw_dist := (ne rotated 90) * 0.5 blot_diameter;
246 nw := unitvector (z2 - z3);
247 ne_dist := (nw rotated -90) * 0.5 blot_diameter;
250 .. (z1 + nw_dist){ne}
251 -- (z2 + nw_dist){ne}
253 .. (z2 + ne_dist){-nw}
254 -- (z3 + ne_dist){-nw}
256 .. (z3 - nw_dist){-ne}
257 -- (z4 - nw_dist){-ne}
259 .. (z4 - ne_dist){nw}
260 -- (z1 - ne_dist){nw}
267 def draw_neomensural_open_head (expr wid, height)=
268 draw_neomensural_black_head (wid, height);
272 diamNW = length (z2 - z1) + blot_diameter;
273 diamSW = length (z4 - z1) + blot_diameter;
275 save hole_widthNW, hole_widthSW;
277 hole_widthNW = 0.34 diamNW ;
278 hole_widthSW + 2.6 linethickness = diamSW;
280 (z7 + z5) / 2 = (w / 2, 0);
281 (z8 + z6) / 2 = (w / 2, 0);
282 z6 - z5 = hole_widthNW * unitvector (z2 - z1);
283 z7 - z6 = hole_widthSW * unitvector (z4 - z1);
296 % WL says the thin lines should be thinner.
298 fet_beginchar ("Harmonic notehead (Neo-mensural open)", "s0harmonic");
299 draw_neomensural_open_head (1.3 staff_space#, 1.3 noteheight#);
300 charwx := head_width#;
305 fet_beginchar ("Harmonic notehead (Neo-mensural black)", "s2harmonic");
306 draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#);
307 charwx := head_width#;
312 fet_beginchar ("Neo-mensural semibrevis head", "s0neomensural");
313 draw_neomensural_open_head (staff_space#, noteheight#);
317 fet_beginchar ("Neo-mensural minima head", "s1neomensural");
318 draw_neomensural_open_head (staff_space#, noteheight#);
322 fet_beginchar ("Neo-mensural semiminima head", "s2neomensural");
323 draw_neomensural_black_head (staff_space#, noteheight#);
327 def draw_mensural_brevis (expr wid, open, full) =
328 % TODO. For the moment, fall back to draw_neomensural_brevis.
329 draw_neomensural_brevis (wid, open, full);
333 %%% This head does not seem to be used anywhere. Junk me? -- jr
334 def draw_mensural_left_stemmed_head (expr wid, open, full) =
335 draw_mensural_brevis (wid, open, full);
337 x6 = x7 = stem_width / 2;
339 y7 = y5 - 2.25 staff_space;
341 z17 = (x7, y7 - stem_width / 2);
343 penpos6 (stem_width, 0);
344 penpos7 (stem_width, 0);
358 def draw_mensural_longa (expr wid, open, full) =
359 draw_mensural_brevis (wid, open, full);
361 x6 = x7 = head_width - stem_width / 2;
363 y7 = y5 - 2.25 staff_space;
365 z17 = (x7, y7 - stem_width / 2);
367 penpos6 (stem_width, 0);
368 penpos7 (stem_width, 0);
382 %%% This head does not seem to be used anywhere. Junk me? -- jr
383 fet_beginchar ("Mensural left stemmed notehead", "slmensural");
384 draw_mensural_left_stemmed_head (staff_space#, true, true);
388 fet_beginchar ("Mensural maxima notehead", "sM3mensural");
389 draw_mensural_longa (2.0 staff_space#, true, true);
393 fet_beginchar ("Mensural maxima notehead in ligaturae", "sM3ligmensural");
394 draw_mensural_brevis (2.0 staff_space#, true, true);
398 fet_beginchar ("Mensural longa notehead", "sM2mensural");
399 draw_mensural_longa (staff_space#, true, true);
403 fet_beginchar ("Mensural brevis notehead", "sM1mensural");
404 draw_mensural_brevis (staff_space#, true, true);
408 fet_beginchar ("Black mensural maxima notehead", "sM3blackmensural");
409 draw_mensural_longa (2.0 staff_space#, false, false);
413 fet_beginchar ("Black mensural maxima notehead in ligaturae", "sM3blackligmensural");
414 draw_mensural_brevis (2.0 staff_space#, false, false);
418 fet_beginchar ("Black mensural longa notehead", "sM2blackmensural");
419 draw_mensural_longa (staff_space#, false, false);
423 fet_beginchar ("Black mensural brevis notehead", "sM1blackmensural");
424 draw_mensural_brevis (staff_space#, false, false);
428 fet_beginchar ("Semi-colored mensural maxima notehead", "sM3semimensural");
429 draw_mensural_longa (2.0 staff_space#, true, false);
433 fet_beginchar ("Semi-colored mensural maxima notehead in ligaturae", "sM3semiligmensural");
434 draw_mensural_brevis (2.0 staff_space#, true, false);
438 fet_beginchar ("Semi-colored mensural longa notehead", "sM2semimensural");
439 draw_mensural_longa (staff_space#, true, false);
443 fet_beginchar ("Semi-colored mensural brevis notehead", "sM1semimensural");
444 draw_mensural_brevis (staff_space#, true, false);
448 def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
449 save head_width, head_height;
450 save ellipse, ellipse_r;
451 path ellipse, ellipse_r, diamond_shape;
453 head_height# = head_h;
454 head_width# / head_height# = tand (angle);
456 set_char_box (0, head_width#,
457 head_height# / 2, head_height# / 2);
459 charwx := head_width# / 2;
460 charwy := head_height# / 2 - linethickness#;
462 define_pixels (head_width, head_height);
464 ellipse := reverse fullcircle
465 xscaled (max (blot_diameter, pen_w * head_width))
466 yscaled (max (blot_diameter, pen_h * head_width))
469 z1 = find_tangent_shift (((0, h) -- (0, -h)), ellipse,
471 z2 = find_tangent_shift (((0, h) -- (w, h)), ellipse,
472 (w / 2, h), (w / 2, 0));
473 z3 = find_tangent_shift (((w, h) -- (w, -h)), ellipse,
475 z4 = find_tangent_shift (((0, -h) -- (w, -h)), ellipse,
476 (w / 2, -h), (w / 2, 0));
478 diamond_shape := get_subpath (ellipse, z1 - z4, z2 - z1, z1)
479 -- get_subpath (ellipse, z2 - z1, z3 - z2, z2)
480 -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
481 -- get_subpath (ellipse, z4 - z3, z1 - z4, z4)
489 l12 := (directionpoint (z1 - z2) of ellipse) shifted z1
490 -- (directionpoint (z1 - z2) of ellipse) shifted z2;
491 l23 := (directionpoint (z2 - z3) of ellipse) shifted z2
492 -- (directionpoint (z2 - z3) of ellipse) shifted z3;
493 l34 := (directionpoint (z3 - z4) of ellipse) shifted z3
494 -- (directionpoint (z3 - z4) of ellipse) shifted z4;
495 l41 := (directionpoint (z4 - z1) of ellipse) shifted z4
496 -- (directionpoint (z4 - z1) of ellipse) shifted z1;
498 unfill l12 intersectionpoint l23
499 -- l23 intersectionpoint l34
500 -- l34 intersectionpoint l41
501 -- l41 intersectionpoint l12
509 fet_beginchar ("Mensural semibrevis head", "s0mensural");
510 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
514 fet_beginchar ("Mensural minima head", "s1mensural");
515 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
519 fet_beginchar ("Mensural semiminima head", "s2mensural");
520 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
524 fet_beginchar ("Black mensural semibrevis head", "s0blackmensural");
525 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
529 fet_beginchar ("Petrucci semibrevis head", "s0petrucci");
530 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
531 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
535 fet_beginchar ("Petrucci minima head", "s1petrucci");
536 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
537 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
541 fet_beginchar ("Petrucci semiminima head", "s2petrucci");
542 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, false);
543 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
547 fet_beginchar ("Petrucci colored semibrevis head", "s0blackpetrucci");
548 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
549 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
553 fet_beginchar ("Petrucci colored minima head", "s1blackpetrucci");
554 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
555 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
559 fet_beginchar ("Petrucci colored semiminima head", "s2blackpetrucci");
560 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
561 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
569 % EDITIO VATICANA (including solesmes extensions)
574 def vat_punctum_char (expr verbose_name, internal_name,
575 linea, cavum, straight, auctum,
576 d_up, up_shift, down_shift, mag) =
577 fet_beginchar (verbose_name, "s" & internal_name);
580 a_b := 1.54; % b_h * a_b / a_w = wd / ht
584 save a, beta, ht, wd;
586 ht# = noteheight# * mag;
590 black_notehead_width# := wd#;
604 % convexity and eccentricity
605 save u_convexity, u_eccentricity;
608 u_convexity# := -0.01 ht#;
609 u_eccentricity# := 0.0 ht#; % dummy
611 u_convexity# := -0.03 ht#;
612 u_eccentricity# := +0.25 ht#;
614 u_convexity# := -0.05 ht#;
615 u_eccentricity# := 0.0 ht#; % dummy
618 save convexity, eccentricity;
620 convexity# := d_sign * u_convexity#;
621 eccentricity# := d_sign * u_eccentricity#;
634 define_pixels (convexity, eccentricity, yoffs, ht, wd);
636 pickup pencircle scaled linethickness;
638 save height, yoffs_bt, p, circle, circle_r;
639 path p, circle, circle_r;
642 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
644 define_pixels (height, yoffs_bt);
646 circle := fullcircle scaled linethickness;
655 save box_top, box_bt;
658 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
659 z2 = (0.21 wd, yoffs_bt + convexity);
660 z3 = (0.42 wd - linethickness/ 2,
661 yoffs_bt + eccentricity);
662 box_top# = height# + yoffs_bt# +
663 max (0, convexity#, eccentricity#);
664 box_bt# = yoffs_bt# +
665 min (0, convexity#, eccentricity#);
674 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
675 z2 = (0.21 wd, yoffs_bt + convexity);
676 z3 = (0.42 wd - linethickness / 2, yoffs_bt);
677 box_top# = height# + yoffs_bt# + max (0, convexity#);
678 box_bt# = yoffs_bt# + min (0, convexity#);
688 labels (1, 2, 3, 4, 5, 6);
693 dirs12 := direction (0 + epsilon) of p;
694 dirs2 := direction 1 of p;
695 dirs32 := direction (2 - epsilon) of p;
696 dirs45 := direction (3 + epsilon) of p;
697 dirs5 := direction 4 of p;
698 dirs65 := direction (5 - epsilon) of p;
700 fill get_subpath (circle, down, dirs12, z1)
702 .. get_subpath (circle, dirs32, up, z3)
703 -- get_subpath (circle, up, dirs45, z4)
705 .. get_subpath (circle, dirs65, down, z6)
713 pat123 := ((directionpoint -dirs12 of circle)
716 .. {dirs32}((directionpoint -dirs32 of circle)
720 pat456 := ((directionpoint -dirs45 of circle)
723 .. {dirs65}((directionpoint -dirs65 of circle)
728 t61 := ypart (pat61 intersectiontimes pat123);
729 t12 := xpart (pat123 intersectiontimes pat34);
730 t34 := ypart (pat34 intersectiontimes pat456);
731 t45 := xpart (pat456 intersectiontimes pat61);
733 unfill subpath (t61, t12) of pat123
734 -- subpath (t34, t45) of pat456
738 set_char_box (0.00 wd#, 0.42 wd#,
739 max (0, -box_bt#) + linethickness# / 2,
740 max (0, box_top#) + linethickness# / 2);
743 save linea_width, linea_height;
745 linea_width# = 0.6 linethickness#;
746 linea_height# = 0.7 ht#;
748 define_pixels (linea_width, linea_height);
750 pickup pencircle scaled 0.6 linethickness;
752 draw_rounded_block ((-0.10 wd - linea_width / 2,
754 (-0.10 wd + linea_width / 2,
757 draw_rounded_block ((+0.52 wd - linea_width / 2,
759 (+0.52 wd + linea_width / 2,
763 set_char_box (0, 0.62 wd# + linea_width#,
767 currentpicture := currentpicture
768 shifted (0.10 wd + linea_width / 2, 0);
774 def plica_char (expr verbose_name, internal_name,
776 fet_beginchar (verbose_name, "s" & internal_name);
779 a_b := 1.54; % b_h * a_b / a_w = wd / ht
783 save a, beta, ht, wd;
785 ht# = noteheight# * mag;
789 black_notehead_width# := wd#;
803 % convexity and eccentricity
804 save convexity, eccentricity;
806 convexity# := d_sign * -0.10 ht#;
807 eccentricity# := d_sign * -0.12 ht#;
814 define_pixels (convexity, eccentricity, yoffs, ht, wd);
816 pickup pencircle scaled linethickness;
818 save height, yoffs_bt, p, circle, circle_r;
819 path p, circle, circle_r;
822 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
824 define_pixels (height, yoffs_bt);
826 circle := fullcircle scaled linethickness;
835 save box_top, box_bt;
837 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
838 z2 = (0.21 wd, yoffs_bt + convexity);
839 z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
840 box_top# = height# + yoffs_bt# +
841 max (0, convexity#, eccentricity#);
842 box_bt# = yoffs_bt# +
843 min (0, convexity#, eccentricity#);
852 labels (1, 2, 3, 4, 5, 6);
857 dirs12 := direction (0 + epsilon) of p;
858 dirs2 := direction 1 of p;
859 dirs32 := direction (2 - epsilon) of p;
860 dirs45 := direction (3 + epsilon) of p;
861 dirs5 := direction 4 of p;
862 dirs65 := direction (5 - epsilon) of p;
864 fill get_subpath (circle, down, dirs12, z1)
866 .. get_subpath (circle, dirs32, up, z3)
867 -- get_subpath (circle, up, dirs45, z4)
869 .. get_subpath (circle, dirs65, down, z6)
872 pickup pencircle scaled 0.6 linethickness;
876 set_char_box (0.00 wd#, 0.42 wd#,
877 max (0, -box_bt#) + linethickness# / 2,
878 max (0, box_top#) + linethickness# / 2);
884 def epiphonus_char (expr verbose_name, internal_name,
885 left_stem, d_up, down_shift, mag) =
886 fet_beginchar (verbose_name, "s" & internal_name);
889 a_b := 1.54; % b_h * a_b / a_w = wd / ht
893 save a, beta, ht, wd;
895 ht# = noteheight# * mag;
899 black_notehead_width# := wd#;
913 % convexity and eccentricity
916 convexity# := d_sign * -0.05ht#;
927 define_pixels (convexity, yoffs, ht, wd);
929 pickup pencircle scaled linethickness;
931 save height, yoffs_bt, p, circle, circle_r;
932 path p, circle, circle_r;
935 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
937 define_pixels (height, yoffs_bt);
939 circle := fullcircle scaled linethickness;
948 save box_top, box_bt;
950 z1 = (0.00 wd + linethickness / 2, yoffs_bt - 2.5 convexity);
951 z2 = (0.06 wd, yoffs_bt + 1.4 convexity);
952 z3 = (0.42 wd - linethickness / 2, yoffs_bt - 1.0 convexity);
953 box_top# = height# + yoffs_bt# +
954 max (-1.0 convexity#, 1.4 convexity#, 0);
955 box_bt# = yoffs_bt# +
956 min (-1.0 convexity#, 1.4 convexity#, 0);
965 labels (1, 2, 3, 4, 5, 6);
970 dirs12 := direction (0 + epsilon) of p;
971 dirs21 := direction (1 - epsilon) of p;
972 dirs23 := direction (1 + epsilon) of p;
973 dirs32 := direction (2 - epsilon) of p;
974 dirs45 := direction (3 + epsilon) of p;
975 dirs54 := direction (4 - epsilon) of p;
976 dirs56 := direction (4 + epsilon) of p;
977 dirs65 := direction (5 - epsilon) of p;
979 fill get_subpath (circle, down, dirs12, z1)
980 .. get_subpath (circle, dirs21, dirs23, z2)
981 .. get_subpath (circle, dirs32, up, z3)
982 -- get_subpath (circle, up, dirs45, z4)
983 .. get_subpath (circle, dirs54, dirs56, z5)
984 .. get_subpath (circle, dirs65, down, z6)
990 pickup pencircle scaled 0.6 linethickness;
992 lft x11 = x1 - linethickness / 2;
993 bot y11 = yoffs - 1.1 ht - linethickness / 2;
997 draw_rounded_block (bot lft z11, top rt z12,
999 stem_bt# = yoffs# - 1.1 ht#;
1006 set_char_box (0.00 wd#, 0.42 wd#,
1007 max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
1008 max (0, box_top#) + linethickness# / 2);
1013 def inclinatum_char (expr verbose_name, internal_name,
1014 small, stropha, auctum) =
1015 fet_beginchar (verbose_name, "s" & internal_name);
1021 ht# = 0.50 noteheight#;
1023 ht# = 0.80 noteheight#;
1026 draw_diamond_head (ht#, 0, 0, alpha, false);
1030 off_angle := alpha + 15;
1032 save stropha_ellipse, auctum_hook, circle;
1033 path stropha_ellipse, auctum_hook, circle;
1035 circle := reverse fullcircle scaled linethickness;
1037 stropha_ellipse := fullcircle xscaled 0.25 head_height
1038 yscaled 0.55 head_height
1042 + linethickness / 2 * dir (180 - off_angle)
1043 - directionpoint dir (90 - off_angle)
1045 z12 = directionpoint -dir (90 - off_angle) of diamond_shape +
1046 linethickness / 2 * dir (180 - off_angle);
1047 z13 = (0, -0.5 head_height + linethickness);
1049 auctum_hook := z12{-dir (90 - off_angle)}
1050 .. {dir (90 + alpha)}z13;
1054 if (stropha and not auctum):
1059 t_in := xpart ((stropha_ellipse shifted z11)
1061 get_subpath (diamond_shape,
1064 t_out := xpart ((stropha_ellipse shifted z11)
1066 get_subpath (diamond_shape,
1070 % the addition or subtraction of `1' is necessary
1071 % so that we get the right starting point
1072 fill get_subpath_i (diamond_shape,
1073 dir (angle (z2 - z1) - 1),
1074 dir (angle (z1 - z4) + 1),
1076 -- get_subpath (stropha_ellipse,
1077 direction t_in of stropha_ellipse,
1078 direction t_out of stropha_ellipse,
1085 if (auctum and not stropha):
1088 fill get_subpath (diamond_shape,
1090 -dir (90 - off_angle),
1092 .. get_subpath (circle,
1096 .. get_subpath (circle,
1097 dir (90 - off_angle),
1105 if (auctum and stropha):
1110 t := xpart ((stropha_ellipse shifted z11)
1112 get_subpath (diamond_shape, up, right,
1115 % the addition or subtraction of `1' is necessary
1116 % so that we get the right starting point
1117 fill get_subpath_i (diamond_shape,
1118 dir (angle (z2 - z1) - 1),
1119 -dir (90 - off_angle),
1121 .. get_subpath (circle,
1125 .. get_subpath (stropha_ellipse,
1126 dir (90 - off_angle),
1127 direction t of stropha_ellipse,
1138 vat_punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
1139 false, false, false, false,
1140 false, false, false, 1.0);
1143 % punctum cavum (for OpusTeX compatibility)
1144 vat_punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
1145 false, true, false, false,
1146 false, false, false, 1.0);
1149 % linea punctum (for OpusTeX compatibility)
1150 vat_punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
1151 true, false, false, false,
1152 false, false, false, 1.0);
1155 % linea punctum cavum (for OpusTeX compatibility)
1156 vat_punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
1157 true, true, false, false,
1158 false, false, false, 1.0);
1161 % punctum inclinatum
1162 inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum",
1163 false, false, false);
1167 vat_punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
1168 false, false, true, false,
1169 true, false, false, 1.0);
1173 vat_punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
1174 false, false, true, false,
1175 true, false, true, 1.0);
1179 vat_punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes",
1180 false, false, true, false,
1181 false, false, false, 1.0);
1184 % pes upper punctum (shifted variation)
1186 % This note head is used instead of the regular pes upper punctum to
1187 % avoid collision with the lower punctum note of the pes when the upper
1188 % punctum sits directly on top of the lower punctum.
1190 vat_punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
1191 false, false, true, false,
1192 false, true, false, 1.0);
1195 % small punctum as used in epiphonus
1196 vat_punctum_char ("Ed. Vat. plica", "vaticana.plica",
1197 false, false, false, false,
1198 false, false, false, 0.6);
1201 % small punctum as used in epiphonus
1202 plica_char ("Ed. Vat. var plica", "vaticana.vplica",
1206 % eccentric punctum as used in epiphonus
1207 epiphonus_char ("Ed. Vat. epiphonus", "vaticana.epiphonus",
1208 false, true, false, 1.0);
1211 % eccentric punctum as used in epiphonus (shifted variation)
1213 % This note head is used instead of the regular epiphonus punctum to
1214 % avoid collision with the plica head when the plica sits directly on
1215 % top of the lower head.
1217 epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
1218 false, true, true, 1.0);
1221 % small punctum as used in cephalicus
1222 vat_punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
1223 false, false, false, false,
1224 true, false, false, 0.6);
1227 % small punctum as used in cephalicus
1228 plica_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
1232 % eccentric punctum as used in cephalicus; without left stem
1233 epiphonus_char ("Ed. Vat. inner cephalicus", "vaticana.inner.cephalicus",
1234 false, false, false, 1.0);
1237 % eccentric punctum as used in cephalicus; with left stem
1238 epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
1239 true, false, false, 1.0);
1243 fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma");
1246 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1250 save a, beta, ht, wd;
1257 set_char_box (0, 0.42 wd#, 0.28 ht#, 0.36 ht#);
1259 black_notehead_width# := wd#;
1261 define_pixels (ht, wd);
1267 T := identity xscaled linethickness
1269 pickup pencircle transformed T;
1270 ellipse := reverse fullcircle transformed T;
1272 z1 = (rt 0.00 wd, top -0.28 ht);
1273 z2 = (0.11 wd, -0.14 ht);
1274 z3 = (0.12 wd, +0.03 ht);
1275 z4 = (0.25 wd, -0.09 ht);
1276 z5 = (0.25 wd, +0.08 ht);
1277 z6 = (lft 0.42 wd, -0.04 ht);
1278 z7 = (lft 0.40 wd, bot +0.36 ht);
1280 fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
1281 -- get_subpath (ellipse, z2 - z1, z1 - z2, z2)
1283 fill get_subpath (ellipse, z3 - z4, z4 - z3, z3)
1284 -- get_subpath (ellipse, z4 - z3, z3 - z4, z4)
1286 fill get_subpath (ellipse, z5 - z6, z6 - z5, z5)
1287 -- point 0 of get_subpath (ellipse, z6 - z5, z5 - z6, z6)
1288 -- get_subpath (ellipse, z7 - z6, z6 - z7, z7)
1289 -- get_subpath (ellipse, z6 - z7, z5 - z6, z6)
1292 labels (1, 2, 3, 4, 5, 6, 7);
1296 % solesmes punctum inclinatum parvum
1297 inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum",
1298 true, false, false);
1301 % solesmes punctum auctum ascendens
1302 vat_punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
1303 false, false, false, true,
1304 true, false, false, 1.0);
1307 % solesmes punctum auctum descendens
1308 vat_punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
1309 false, false, false, true,
1310 false, false, false, 1.0);
1313 % solesmes punctum inclinatum auctum
1314 inclinatum_char ("Solesmes punctum incl. auctum", "solesmes.incl.auctum",
1315 false, false, true);
1319 inclinatum_char ("Solesmes stropha", "solesmes.stropha",
1320 false, true, false);
1323 % solesmes stropha aucta
1324 inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta",
1329 fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus");
1332 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1336 save a, beta, ht, wd;
1342 black_notehead_width# := wd#;
1346 convexity# = +0.05 ht#;
1348 define_pixels (ht, wd, convexity);
1350 set_char_box (0.00 wd#, 0.50 wd#,
1351 0.25 ht# + convexity#, 0.25 ht# + convexity#);
1353 z1 = (0.00 wd + blot_diameter / 2, -convexity);
1354 z2 = (1/6 wd, +convexity);
1355 z3 = (2/6 wd, -convexity);
1356 z4 = (0.50 wd - blot_diameter / 2, +convexity);
1361 height = 2 ypart (directionpoint right of (z1
1370 T := identity xscaled blot_diameter
1371 yscaled (h + d - height);
1372 pickup pencircle transformed T;
1373 ellipse := fullcircle transformed T;
1375 % Adjust vertical coordinates to touch bounding box.
1382 d_ := direction 0 of (z1
1387 fill get_subpath (ellipse, -d_, d_, z1)
1390 .. get_subpath (ellipse, d_, -d_, z4)
1395 labels (1, 2, 3, 4);
1409 fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum");
1410 draw_diamond_head (1.2 staff_space#, 0, 0, 35, false);
1414 def med_punctum_char (expr verbose_name, internal_name,
1415 left_up_stem, left_down_stem) =
1416 fet_beginchar (verbose_name, "s" & internal_name);
1419 ht# = 2 staff_space#;
1421 black_notehead_width# := wd#;
1423 define_pixels (ht, wd);
1428 ellipse := fullcircle xscaled blot_diameter
1431 z1 = (0.00 wd + blot_diameter / 2, 0);
1432 z2 = (0.4 wd - blot_diameter / 2, 0);
1436 pickup pencircle scaled linethickness;
1439 z4 = (0.00 wd + linethickness / 2, -1.25 ht);
1441 fill get_subpath (ellipse, left, down, z1)
1445 -- (rt x4, -.5 ht / 2)
1446 -- get_subpath (ellipse, right, left, z2)
1451 set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
1452 elseif left_up_stem:
1453 z4 = (0.00 wd + linethickness / 2, +1.25 ht);
1455 fill get_subpath (ellipse, down, right, z1)
1456 -- get_subpath (ellipse, right, left, z2)
1457 -- (rt x4, .5 ht / 2)
1465 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
1467 fill get_subpath (ellipse, left, right, z1)
1468 -- get_subpath (ellipse, right, left, z2)
1471 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#);
1479 med_punctum_char ("Ed. Med. punctum", "medicaea.punctum",
1483 % left up-stemmed punctum
1484 med_punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
1488 % virga (i.e. left down-stemmed punctum)
1489 med_punctum_char ("Ed. Med. virga", "medicaea.virga",
1502 def huf_punctum_char (expr verbose_name, internal_name,
1504 fet_beginchar (verbose_name, "s" & internal_name);
1509 draw_diamond_head (staff_space#, 0, 0, alpha, false);
1512 set_char_box (0, head_width#,
1513 1.5 staff_space#, head_height# / 2);
1518 ellipse := reverse fullcircle xscaled blot_diameter
1519 yscaled 0.7 staff_space
1522 z11 = (head_width / 2, 0);
1523 z12 = find_tangent_shift (((0, -d) -- (w, -d)), ellipse,
1524 (w / 2, -d), (w / 2, 0));
1526 fill get_subpath (ellipse, up, down, z11)
1527 -- get_subpath (ellipse, down, up, z12)
1537 huf_punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
1541 huf_punctum_char ("Hufnagel virga", "hufnagel.virga", true)
1545 fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes")
1546 save width, height, alpha;
1548 width# = 2 * staff_space#;
1549 height# = 0.7 * staff_space#;
1552 set_char_box (0, width#, height# / 2, height# / 2);
1554 define_pixels (width, height);
1559 circle := reverse fullcircle scaled linethickness;
1561 pickup pencircle scaled linethickness;
1563 rt x3 = -lft x1 = width / 2;
1564 y2 = y3 = height / 2;
1565 y1 = y4 = -height / 2;
1567 tand (alpha) * (y2 - y1) = x2 - x1 = x3 - x4;
1569 fill get_subpath (circle, left, z2 - z1, z1)
1570 -- get_subpath (circle, z2 - z1, right, z2)
1571 -- get_subpath (circle, right, z4 - z3, z3)
1572 -- get_subpath (circle, z4 - z3, left, z4)
1575 currentpicture := currentpicture shifted (width/2, 0);
1577 % labels (1, 2, 3, 4);
1581 fet_endgroup ("noteheads");