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?
50 noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
51 define_pixels (noteheight);
63 def draw_neomensural_brevis (expr brevwid, open, full) =
64 save beamheight, head_width;
65 save holeheight, stem_width;
66 save serif_size, serif_protrude;
68 head_width# = brevwid;
69 holeheight = 3 stafflinethickness;
70 stem_width = 1.4 stafflinethickness;
72 define_pixels (head_width);
74 set_char_box (0, head_width#,
75 noteheight# / 2, noteheight# / 2);
77 2 beamheight + holeheight = noteheight;
78 serif_size = (holeheight - stafflinethickness) / 2;
79 serif_protrude = 1.5 serif_size;
82 z2l = (0, -stafflinethickness / 2);
83 z3r = z2r + serif_size * (1, -1);
86 z5l = z3l + (-serif_size, -serif_protrude);
88 penpos1 (stem_width, 0);
89 penpos2 (stem_width, 0);
90 penpos3 (beamheight, 90);
91 penpos4 (beamheight, 90);
92 penpos5 (stem_width, 180);
103 -- reverse pat_out yscaled -1;
105 -- reverse pat_out shifted (-x4r, 0)
120 -- reverse pat_in yscaled -1;
123 -- reverse pat_in shifted (-x4r, 0)
132 penlabels (1, 2, 3, 4, 5);
136 %%% This head does not seem to be used anywhere. Junk me? -- jr
137 def draw_neomensural_left_stemmed_head (expr wid) =
138 draw_neomensural_brevis (wid, true, true);
140 x6 = x7 = stem_width / 2;
142 y7 = y5 - 2.25 staff_space;
144 z17 = (x7, y7 - stem_width / 2);
146 penpos6 (stem_width, 0);
147 penpos7 (stem_width, 0);
161 %%% This head does not seem to be used anywhere. Junk me? -- jr
162 fet_beginchar ("Left stemmed notehead", "slneomensural");
163 draw_neomensural_left_stemmed_head (2 staff_space#);
168 % Some sources (eg. Musix/OpusTeX) think that the appendage should be on
169 % the left, some say right. Right wins democratically.
171 def draw_neomensural_longa (expr wid) =
172 draw_neomensural_brevis (wid, true, true);
178 z6 - z7 = (stem_width / 2, -staff_space);
179 theta = angle (z6 - z7) + 90;
181 penpos7 (stem_width, 0);
182 penpos6 (1.2 stem_width, theta);
184 z7' = find_tangent (z6l, pat_out,
185 (x7l + 0.5 stem_width, y7l),
186 (x7l - 0.5 stem_width, y7l));
200 % En wij presenteren U: de opvolgster van Emily
204 fet_beginchar ("Neo-mensural maxima notehead", "sM3neomensural");
205 draw_neomensural_longa (2.6 staff_space#);
209 fet_beginchar ("Neo-mensural longa notehead", "sM2neomensural");
210 draw_neomensural_longa (2 staff_space#);
214 fet_beginchar ("Neo-mensural brevis notehead", "sM1neomensural");
215 draw_neomensural_brevis (2 staff_space#, true, true);
219 def draw_neomensural_black_head (expr wid, height) =
221 save ne, nw, ne_dist, nw_dist;
222 pair ne, nw, ne_dist, nw_dist;
226 set_char_box (0, head_width#,
227 height / 2, height / 2);
229 charwx := head_width# / 2;
230 charwy := height / 2;
233 x2 = x4 = (x1 + x3) / 2;
235 pickup pencircle scaled blot_diameter;
242 ne := unitvector (z2 - z1);
243 nw_dist := (ne rotated 90) * 0.5 blot_diameter;
244 nw := unitvector (z2 - z3);
245 ne_dist := (nw rotated -90) * 0.5 blot_diameter;
248 .. (z1 + nw_dist){ne}
249 -- (z2 + nw_dist){ne}
251 .. (z2 + ne_dist){-nw}
252 -- (z3 + ne_dist){-nw}
254 .. (z3 - nw_dist){-ne}
255 -- (z4 - nw_dist){-ne}
257 .. (z4 - ne_dist){nw}
258 -- (z1 - ne_dist){nw}
265 def draw_neomensural_open_head (expr wid, height)=
266 draw_neomensural_black_head (wid, height);
270 diamNW = length (z2 - z1) + blot_diameter;
271 diamSW = length (z4 - z1) + blot_diameter;
273 save hole_widthNW, hole_widthSW;
275 hole_widthNW = 0.34 diamNW ;
276 hole_widthSW + 2.6 linethickness = diamSW;
278 (z7 + z5) / 2 = (w / 2, 0);
279 (z8 + z6) / 2 = (w / 2, 0);
280 z6 - z5 = hole_widthNW * unitvector (z2 - z1);
281 z7 - z6 = hole_widthSW * unitvector (z4 - z1);
294 % WL says the thin lines should be thinner.
296 fet_beginchar ("Harmonic notehead (Neo-mensural open)", "s0harmonic");
297 draw_neomensural_open_head (1.3 staff_space#, 1.3 noteheight#);
298 charwx := head_width#;
303 fet_beginchar ("Harmonic notehead (Neo-mensural black)", "s2harmonic");
304 draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#);
305 charwx := head_width#;
310 fet_beginchar ("Neo-mensural semibrevis head", "s0neomensural");
311 draw_neomensural_open_head (staff_space#, noteheight#);
315 fet_beginchar ("Neo-mensural minima head", "s1neomensural");
316 draw_neomensural_open_head (staff_space#, noteheight#);
320 fet_beginchar ("Neo-mensural semiminima head", "s2neomensural");
321 draw_neomensural_black_head (staff_space#, noteheight#);
325 def draw_mensural_brevis (expr wid, open, full) =
326 % TODO. For the moment, fall back to draw_neomensural_brevis.
327 draw_neomensural_brevis (wid, open, full);
331 %%% This head does not seem to be used anywhere. Junk me? -- jr
332 def draw_mensural_left_stemmed_head (expr wid, open, full) =
333 draw_mensural_brevis (wid, open, full);
335 x6 = x7 = stem_width / 2;
337 y7 = y5 - 2.25 staff_space;
339 z17 = (x7, y7 - stem_width / 2);
341 penpos6 (stem_width, 0);
342 penpos7 (stem_width, 0);
356 def draw_mensural_longa (expr wid, open, full) =
357 draw_mensural_brevis (wid, open, full);
359 x6 = x7 = head_width - stem_width / 2;
361 y7 = y5 - 2.25 staff_space;
363 z17 = (x7, y7 - stem_width / 2);
365 penpos6 (stem_width, 0);
366 penpos7 (stem_width, 0);
380 %%% This head does not seem to be used anywhere. Junk me? -- jr
381 fet_beginchar ("Mensural left stemmed notehead", "slmensural");
382 draw_mensural_left_stemmed_head (staff_space#, true, true);
386 fet_beginchar ("Mensural maxima notehead", "sM3mensural");
387 draw_mensural_longa (2.0 staff_space#, true, true);
391 fet_beginchar ("Mensural maxima notehead in ligaturae", "sM3ligmensural");
392 draw_mensural_brevis (2.0 staff_space#, true, true);
396 fet_beginchar ("Mensural longa notehead", "sM2mensural");
397 draw_mensural_longa (staff_space#, true, true);
401 fet_beginchar ("Mensural brevis notehead", "sM1mensural");
402 draw_mensural_brevis (staff_space#, true, true);
406 fet_beginchar ("Black mensural maxima notehead", "sM3blackmensural");
407 draw_mensural_longa (2.0 staff_space#, false, false);
411 fet_beginchar ("Black mensural maxima notehead in ligaturae", "sM3blackligmensural");
412 draw_mensural_brevis (2.0 staff_space#, false, false);
416 fet_beginchar ("Black mensural longa notehead", "sM2blackmensural");
417 draw_mensural_longa (staff_space#, false, false);
421 fet_beginchar ("Black mensural brevis notehead", "sM1blackmensural");
422 draw_mensural_brevis (staff_space#, false, false);
426 fet_beginchar ("Semi-colored mensural maxima notehead", "sM3semimensural");
427 draw_mensural_longa (2.0 staff_space#, true, false);
431 fet_beginchar ("Semi-colored mensural maxima notehead in ligaturae", "sM3semiligmensural");
432 draw_mensural_brevis (2.0 staff_space#, true, false);
436 fet_beginchar ("Semi-colored mensural longa notehead", "sM2semimensural");
437 draw_mensural_longa (staff_space#, true, false);
441 fet_beginchar ("Semi-colored mensural brevis notehead", "sM1semimensural");
442 draw_mensural_brevis (staff_space#, true, false);
446 def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
447 save head_width, head_height;
448 save ellipse, ellipse_r;
449 path ellipse, ellipse_r, diamond_shape;
451 head_height# = head_h;
452 head_width# / head_height# = tand (angle);
454 set_char_box (0, head_width#,
455 head_height# / 2, head_height# / 2);
457 charwx := head_width# / 2;
458 charwy := head_height# / 2 - linethickness#;
460 define_pixels (head_width, head_height);
462 ellipse := reverse fullcircle
463 xscaled (max (blot_diameter, pen_w * head_width))
464 yscaled (max (blot_diameter, pen_h * head_width))
467 z1 = find_tangent_shift (((0, h) -- (0, -h)), ellipse,
469 z2 = find_tangent_shift (((0, h) -- (w, h)), ellipse,
470 (w / 2, h), (w / 2, 0));
471 z3 = find_tangent_shift (((w, h) -- (w, -h)), ellipse,
473 z4 = find_tangent_shift (((0, -h) -- (w, -h)), ellipse,
474 (w / 2, -h), (w / 2, 0));
476 diamond_shape := get_subpath (ellipse, z1 - z4, z2 - z1, z1)
477 -- get_subpath (ellipse, z2 - z1, z3 - z2, z2)
478 -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
479 -- get_subpath (ellipse, z4 - z3, z1 - z4, z4)
487 l12 := (directionpoint (z1 - z2) of ellipse) shifted z1
488 -- (directionpoint (z1 - z2) of ellipse) shifted z2;
489 l23 := (directionpoint (z2 - z3) of ellipse) shifted z2
490 -- (directionpoint (z2 - z3) of ellipse) shifted z3;
491 l34 := (directionpoint (z3 - z4) of ellipse) shifted z3
492 -- (directionpoint (z3 - z4) of ellipse) shifted z4;
493 l41 := (directionpoint (z4 - z1) of ellipse) shifted z4
494 -- (directionpoint (z4 - z1) of ellipse) shifted z1;
496 unfill l12 intersectionpoint l23
497 -- l23 intersectionpoint l34
498 -- l34 intersectionpoint l41
499 -- l41 intersectionpoint l12
507 fet_beginchar ("Mensural semibrevis head", "s0mensural");
508 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
512 fet_beginchar ("Mensural minima head", "s1mensural");
513 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
517 fet_beginchar ("Mensural semiminima head", "s2mensural");
518 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
522 fet_beginchar ("Black mensural semibrevis head", "s0blackmensural");
523 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
527 fet_beginchar ("Petrucci semibrevis head", "s0petrucci");
528 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
529 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
533 fet_beginchar ("Petrucci minima head", "s1petrucci");
534 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
535 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
539 fet_beginchar ("Petrucci semiminima head", "s2petrucci");
540 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, false);
541 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
545 fet_beginchar ("Petrucci colored semibrevis head", "s0blackpetrucci");
546 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
547 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
551 fet_beginchar ("Petrucci colored minima head", "s1blackpetrucci");
552 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
553 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
557 fet_beginchar ("Petrucci colored semiminima head", "s2blackpetrucci");
558 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
559 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
567 % EDITIO VATICANA (including solesmes extensions)
572 def vat_punctum_char (expr verbose_name, internal_name,
573 linea, cavum, straight, auctum,
574 d_up, up_shift, down_shift, mag) =
575 fet_beginchar (verbose_name, "s" & internal_name);
578 a_b := 1.54; % b_h * a_b / a_w = wd / ht
582 save a, beta, ht, wd;
584 ht# = noteheight# * mag;
588 black_notehead_width# := wd#;
602 % convexity and eccentricity
603 save u_convexity, u_eccentricity;
606 u_convexity# := -0.01 ht#;
607 u_eccentricity# := 0.0 ht#; % dummy
609 u_convexity# := -0.03 ht#;
610 u_eccentricity# := +0.25 ht#;
612 u_convexity# := -0.05 ht#;
613 u_eccentricity# := 0.0 ht#; % dummy
616 save convexity, eccentricity;
618 convexity# := d_sign * u_convexity#;
619 eccentricity# := d_sign * u_eccentricity#;
632 define_pixels (convexity, eccentricity, yoffs, ht, wd);
634 pickup pencircle scaled linethickness;
636 save height, yoffs_bt, p, circle, circle_r;
637 path p, circle, circle_r;
640 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
642 define_pixels (height, yoffs_bt);
644 circle := fullcircle scaled linethickness;
653 save box_top, box_bt;
656 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
657 z2 = (0.21 wd, yoffs_bt + convexity);
658 z3 = (0.42 wd - linethickness/ 2,
659 yoffs_bt + eccentricity);
660 box_top# = height# + yoffs_bt# +
661 max (0, convexity#, eccentricity#);
662 box_bt# = yoffs_bt# +
663 min (0, convexity#, eccentricity#);
672 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
673 z2 = (0.21 wd, yoffs_bt + convexity);
674 z3 = (0.42 wd - linethickness / 2, yoffs_bt);
675 box_top# = height# + yoffs_bt# + max (0, convexity#);
676 box_bt# = yoffs_bt# + min (0, convexity#);
686 labels (1, 2, 3, 4, 5, 6);
691 dirs12 := direction (0 + epsilon) of p;
692 dirs2 := direction 1 of p;
693 dirs32 := direction (2 - epsilon) of p;
694 dirs45 := direction (3 + epsilon) of p;
695 dirs5 := direction 4 of p;
696 dirs65 := direction (5 - epsilon) of p;
698 fill get_subpath (circle, down, dirs12, z1)
700 .. get_subpath (circle, dirs32, up, z3)
701 -- get_subpath (circle, up, dirs45, z4)
703 .. get_subpath (circle, dirs65, down, z6)
711 pat123 := ((directionpoint -dirs12 of circle)
714 .. {dirs32}((directionpoint -dirs32 of circle)
718 pat456 := ((directionpoint -dirs45 of circle)
721 .. {dirs65}((directionpoint -dirs65 of circle)
726 t61 := ypart (pat61 intersectiontimes pat123);
727 t12 := xpart (pat123 intersectiontimes pat34);
728 t34 := ypart (pat34 intersectiontimes pat456);
729 t45 := xpart (pat456 intersectiontimes pat61);
731 unfill subpath (t61, t12) of pat123
732 -- subpath (t34, t45) of pat456
736 set_char_box (0.00 wd#, 0.42 wd#,
737 max (0, -box_bt#) + linethickness# / 2,
738 max (0, box_top#) + linethickness# / 2);
741 save linea_width, linea_height;
743 linea_width# = 0.6 linethickness#;
744 linea_height# = 0.7 ht#;
746 define_pixels (linea_width, linea_height);
748 pickup pencircle scaled 0.6 linethickness;
750 draw_rounded_block ((-0.10 wd - linea_width / 2,
752 (-0.10 wd + linea_width / 2,
755 draw_rounded_block ((+0.52 wd - linea_width / 2,
757 (+0.52 wd + linea_width / 2,
761 set_char_box (0, 0.62 wd# + linea_width#,
765 currentpicture := currentpicture
766 shifted (0.10 wd + linea_width / 2, 0);
772 def plica_char (expr verbose_name, internal_name,
774 fet_beginchar (verbose_name, "s" & internal_name);
777 a_b := 1.54; % b_h * a_b / a_w = wd / ht
781 save a, beta, ht, wd;
783 ht# = noteheight# * mag;
787 black_notehead_width# := wd#;
801 % convexity and eccentricity
802 save convexity, eccentricity;
804 convexity# := d_sign * -0.10 ht#;
805 eccentricity# := d_sign * -0.12 ht#;
812 define_pixels (convexity, eccentricity, yoffs, ht, wd);
814 pickup pencircle scaled linethickness;
816 save height, yoffs_bt, p, circle, circle_r;
817 path p, circle, circle_r;
820 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
822 define_pixels (height, yoffs_bt);
824 circle := fullcircle scaled linethickness;
833 save box_top, box_bt;
835 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
836 z2 = (0.21 wd, yoffs_bt + convexity);
837 z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
838 box_top# = height# + yoffs_bt# +
839 max (0, convexity#, eccentricity#);
840 box_bt# = yoffs_bt# +
841 min (0, convexity#, eccentricity#);
850 labels (1, 2, 3, 4, 5, 6);
855 dirs12 := direction (0 + epsilon) of p;
856 dirs2 := direction 1 of p;
857 dirs32 := direction (2 - epsilon) of p;
858 dirs45 := direction (3 + epsilon) of p;
859 dirs5 := direction 4 of p;
860 dirs65 := direction (5 - epsilon) of p;
862 fill get_subpath (circle, down, dirs12, z1)
864 .. get_subpath (circle, dirs32, up, z3)
865 -- get_subpath (circle, up, dirs45, z4)
867 .. get_subpath (circle, dirs65, down, z6)
870 pickup pencircle scaled 0.6 linethickness;
874 set_char_box (0.00 wd#, 0.42 wd#,
875 max (0, -box_bt#) + linethickness# / 2,
876 max (0, box_top#) + linethickness# / 2);
882 def epiphonus_char (expr verbose_name, internal_name,
883 left_stem, d_up, down_shift, mag) =
884 fet_beginchar (verbose_name, "s" & internal_name);
887 a_b := 1.54; % b_h * a_b / a_w = wd / ht
891 save a, beta, ht, wd;
893 ht# = noteheight# * mag;
897 black_notehead_width# := wd#;
911 % convexity and eccentricity
914 convexity# := d_sign * -0.05ht#;
925 define_pixels (convexity, yoffs, ht, wd);
927 pickup pencircle scaled linethickness;
929 save height, yoffs_bt, p, circle, circle_r;
930 path p, circle, circle_r;
933 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
935 define_pixels (height, yoffs_bt);
937 circle := fullcircle scaled linethickness;
946 save box_top, box_bt;
948 z1 = (0.00 wd + linethickness / 2, yoffs_bt - 2.5 convexity);
949 z2 = (0.06 wd, yoffs_bt + 1.4 convexity);
950 z3 = (0.42 wd - linethickness / 2, yoffs_bt - 1.0 convexity);
951 box_top# = height# + yoffs_bt# +
952 max (-1.0 convexity#, 1.4 convexity#, 0);
953 box_bt# = yoffs_bt# +
954 min (-1.0 convexity#, 1.4 convexity#, 0);
963 labels (1, 2, 3, 4, 5, 6);
968 dirs12 := direction (0 + epsilon) of p;
969 dirs21 := direction (1 - epsilon) of p;
970 dirs23 := direction (1 + epsilon) of p;
971 dirs32 := direction (2 - epsilon) of p;
972 dirs45 := direction (3 + epsilon) of p;
973 dirs54 := direction (4 - epsilon) of p;
974 dirs56 := direction (4 + epsilon) of p;
975 dirs65 := direction (5 - epsilon) of p;
977 fill get_subpath (circle, down, dirs12, z1)
978 .. get_subpath (circle, dirs21, dirs23, z2)
979 .. get_subpath (circle, dirs32, up, z3)
980 -- get_subpath (circle, up, dirs45, z4)
981 .. get_subpath (circle, dirs54, dirs56, z5)
982 .. get_subpath (circle, dirs65, down, z6)
988 pickup pencircle scaled 0.6 linethickness;
990 lft x11 = x1 - linethickness / 2;
991 bot y11 = yoffs - 1.1 ht - linethickness / 2;
995 draw_rounded_block (bot lft z11, top rt z12,
997 stem_bt# = yoffs# - 1.1 ht#;
1004 set_char_box (0.00 wd#, 0.42 wd#,
1005 max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
1006 max (0, box_top#) + linethickness# / 2);
1011 def inclinatum_char (expr verbose_name, internal_name,
1012 small, stropha, auctum) =
1013 fet_beginchar (verbose_name, "s" & internal_name);
1019 ht# = 0.50 noteheight#;
1021 ht# = 0.80 noteheight#;
1024 draw_diamond_head (ht#, 0, 0, alpha, false);
1028 off_angle := alpha + 15;
1030 save stropha_ellipse, auctum_hook, circle;
1031 path stropha_ellipse, auctum_hook, circle;
1033 circle := reverse fullcircle scaled linethickness;
1035 stropha_ellipse := fullcircle xscaled 0.25 head_height
1036 yscaled 0.55 head_height
1040 + linethickness / 2 * dir (180 - off_angle)
1041 - directionpoint dir (90 - off_angle)
1043 z12 = directionpoint -dir (90 - off_angle) of diamond_shape +
1044 linethickness / 2 * dir (180 - off_angle);
1045 z13 = (0, -0.5 head_height + linethickness);
1047 auctum_hook := z12{-dir (90 - off_angle)}
1048 .. {dir (90 + alpha)}z13;
1052 if (stropha and not auctum):
1057 t_in := xpart ((stropha_ellipse shifted z11)
1059 get_subpath (diamond_shape,
1062 t_out := xpart ((stropha_ellipse shifted z11)
1064 get_subpath (diamond_shape,
1068 % the addition or subtraction of `1' is necessary
1069 % so that we get the right starting point
1070 fill get_subpath_i (diamond_shape,
1071 dir (angle (z2 - z1) - 1),
1072 dir (angle (z1 - z4) + 1),
1074 -- get_subpath (stropha_ellipse,
1075 direction t_in of stropha_ellipse,
1076 direction t_out of stropha_ellipse,
1083 if (auctum and not stropha):
1086 fill get_subpath (diamond_shape,
1088 -dir (90 - off_angle),
1090 .. get_subpath (circle,
1094 .. get_subpath (circle,
1095 dir (90 - off_angle),
1103 if (auctum and stropha):
1108 t := xpart ((stropha_ellipse shifted z11)
1110 get_subpath (diamond_shape, up, right,
1113 % the addition or subtraction of `1' is necessary
1114 % so that we get the right starting point
1115 fill get_subpath_i (diamond_shape,
1116 dir (angle (z2 - z1) - 1),
1117 -dir (90 - off_angle),
1119 .. get_subpath (circle,
1123 .. get_subpath (stropha_ellipse,
1124 dir (90 - off_angle),
1125 direction t of stropha_ellipse,
1136 vat_punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
1137 false, false, false, false,
1138 false, false, false, 1.0);
1141 % punctum cavum (for OpusTeX compatibility)
1142 vat_punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
1143 false, true, false, false,
1144 false, false, false, 1.0);
1147 % linea punctum (for OpusTeX compatibility)
1148 vat_punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
1149 true, false, false, false,
1150 false, false, false, 1.0);
1153 % linea punctum cavum (for OpusTeX compatibility)
1154 vat_punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
1155 true, true, false, false,
1156 false, false, false, 1.0);
1159 % punctum inclinatum
1160 inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum",
1161 false, false, false);
1165 vat_punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
1166 false, false, true, false,
1167 true, false, false, 1.0);
1171 vat_punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
1172 false, false, true, false,
1173 true, false, true, 1.0);
1177 vat_punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes",
1178 false, false, true, false,
1179 false, false, false, 1.0);
1182 % pes upper punctum (shifted variation)
1184 % This note head is used instead of the regular pes upper punctum to
1185 % avoid collision with the lower punctum note of the pes when the upper
1186 % punctum sits directly on top of the lower punctum.
1188 vat_punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
1189 false, false, true, false,
1190 false, true, false, 1.0);
1193 % small punctum as used in epiphonus
1194 vat_punctum_char ("Ed. Vat. plica", "vaticana.plica",
1195 false, false, false, false,
1196 false, false, false, 0.6);
1199 % small punctum as used in epiphonus
1200 plica_char ("Ed. Vat. var plica", "vaticana.vplica",
1204 % eccentric punctum as used in epiphonus
1205 epiphonus_char ("Ed. Vat. epiphonus", "vaticana.epiphonus",
1206 false, true, false, 1.0);
1209 % eccentric punctum as used in epiphonus (shifted variation)
1211 % This note head is used instead of the regular epiphonus punctum to
1212 % avoid collision with the plica head when the plica sits directly on
1213 % top of the lower head.
1215 epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
1216 false, true, true, 1.0);
1219 % small punctum as used in cephalicus
1220 vat_punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
1221 false, false, false, false,
1222 true, false, false, 0.6);
1225 % small punctum as used in cephalicus
1226 plica_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
1230 % eccentric punctum as used in cephalicus; without left stem
1231 epiphonus_char ("Ed. Vat. inner cephalicus", "vaticana.inner.cephalicus",
1232 false, false, false, 1.0);
1235 % eccentric punctum as used in cephalicus; with left stem
1236 epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
1237 true, false, false, 1.0);
1241 fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma");
1244 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1248 save a, beta, ht, wd;
1255 set_char_box (0, 0.42 wd#, 0.28 ht#, 0.36 ht#);
1257 black_notehead_width# := wd#;
1259 define_pixels (ht, wd);
1265 T := identity xscaled linethickness
1267 pickup pencircle transformed T;
1268 ellipse := reverse fullcircle transformed T;
1270 z1 = (rt 0.00 wd, top -0.28 ht);
1271 z2 = (0.11 wd, -0.14 ht);
1272 z3 = (0.12 wd, +0.03 ht);
1273 z4 = (0.25 wd, -0.09 ht);
1274 z5 = (0.25 wd, +0.08 ht);
1275 z6 = (lft 0.42 wd, -0.04 ht);
1276 z7 = (lft 0.40 wd, bot +0.36 ht);
1278 fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
1279 -- get_subpath (ellipse, z2 - z1, z1 - z2, z2)
1281 fill get_subpath (ellipse, z3 - z4, z4 - z3, z3)
1282 -- get_subpath (ellipse, z4 - z3, z3 - z4, z4)
1284 fill get_subpath (ellipse, z5 - z6, z6 - z5, z5)
1285 -- point 0 of get_subpath (ellipse, z6 - z5, z5 - z6, z6)
1286 -- get_subpath (ellipse, z7 - z6, z6 - z7, z7)
1287 -- get_subpath (ellipse, z6 - z7, z5 - z6, z6)
1290 labels (1, 2, 3, 4, 5, 6, 7);
1294 % solesmes punctum inclinatum parvum
1295 inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum",
1296 true, false, false);
1299 % solesmes punctum auctum ascendens
1300 vat_punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
1301 false, false, false, true,
1302 true, false, false, 1.0);
1305 % solesmes punctum auctum descendens
1306 vat_punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
1307 false, false, false, true,
1308 false, false, false, 1.0);
1311 % solesmes punctum inclinatum auctum
1312 inclinatum_char ("Solesmes punctum incl. auctum", "solesmes.incl.auctum",
1313 false, false, true);
1317 inclinatum_char ("Solesmes stropha", "solesmes.stropha",
1318 false, true, false);
1321 % solesmes stropha aucta
1322 inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta",
1327 fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus");
1330 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1334 save a, beta, ht, wd;
1340 black_notehead_width# := wd#;
1344 convexity# = +0.05 ht#;
1346 define_pixels (ht, wd, convexity);
1348 set_char_box (0.00 wd#, 0.50 wd#,
1349 0.25 ht# + convexity#, 0.25 ht# + convexity#);
1351 z1 = (0.00 wd + blot_diameter / 2, -convexity);
1352 z2 = (1/6 wd, +convexity);
1353 z3 = (2/6 wd, -convexity);
1354 z4 = (0.50 wd - blot_diameter / 2, +convexity);
1359 height = 2 ypart (directionpoint right of (z1
1368 T := identity xscaled blot_diameter
1369 yscaled (h + d - height);
1370 pickup pencircle transformed T;
1371 ellipse := fullcircle transformed T;
1373 % Adjust vertical coordinates to touch bounding box.
1380 d_ := direction 0 of (z1
1385 fill get_subpath (ellipse, -d_, d_, z1)
1388 .. get_subpath (ellipse, d_, -d_, z4)
1393 labels (1, 2, 3, 4);
1407 fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum");
1408 draw_diamond_head (1.2 staff_space#, 0, 0, 35, false);
1412 def med_punctum_char (expr verbose_name, internal_name,
1413 left_up_stem, left_down_stem) =
1414 fet_beginchar (verbose_name, "s" & internal_name);
1417 ht# = 2 staff_space#;
1419 black_notehead_width# := wd#;
1421 define_pixels (ht, wd);
1426 ellipse := fullcircle xscaled blot_diameter
1429 z1 = (0.00 wd + blot_diameter / 2, 0);
1430 z2 = (0.4 wd - blot_diameter / 2, 0);
1434 pickup pencircle scaled linethickness;
1437 z4 = (0.00 wd + linethickness / 2, -1.25 ht);
1439 fill get_subpath (ellipse, left, down, z1)
1443 -- (rt x4, -.5 ht / 2)
1444 -- get_subpath (ellipse, right, left, z2)
1449 set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
1450 elseif left_up_stem:
1451 z4 = (0.00 wd + linethickness / 2, +1.25 ht);
1453 fill get_subpath (ellipse, down, right, z1)
1454 -- get_subpath (ellipse, right, left, z2)
1455 -- (rt x4, .5 ht / 2)
1463 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
1465 fill get_subpath (ellipse, left, right, z1)
1466 -- get_subpath (ellipse, right, left, z2)
1469 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#);
1477 med_punctum_char ("Ed. Med. punctum", "medicaea.punctum",
1481 % left up-stemmed punctum
1482 med_punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
1486 % virga (i.e. left down-stemmed punctum)
1487 med_punctum_char ("Ed. Med. virga", "medicaea.virga",
1500 def huf_punctum_char (expr verbose_name, internal_name,
1502 fet_beginchar (verbose_name, "s" & internal_name);
1507 draw_diamond_head (staff_space#, 0, 0, alpha, false);
1510 set_char_box (0, head_width#,
1511 1.5 staff_space#, head_height# / 2);
1516 ellipse := reverse fullcircle xscaled blot_diameter
1517 yscaled 0.7 staff_space
1520 z11 = (head_width / 2, 0);
1521 z12 = find_tangent_shift (((0, -d) -- (w, -d)), ellipse,
1522 (w / 2, -d), (w / 2, 0));
1524 fill get_subpath (ellipse, up, down, z11)
1525 -- get_subpath (ellipse, down, up, z12)
1535 huf_punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
1539 huf_punctum_char ("Hufnagel virga", "hufnagel.virga", true)
1543 fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes")
1544 save width, height, alpha;
1546 width# = 2 * staff_space#;
1547 height# = 0.7 * staff_space#;
1550 set_char_box (0, width#, height# / 2, height# / 2);
1552 define_pixels (width, height);
1557 circle := reverse fullcircle scaled linethickness;
1559 pickup pencircle scaled linethickness;
1561 rt x3 = -lft x1 = width / 2;
1562 y2 = y3 = height / 2;
1563 y1 = y4 = -height / 2;
1565 tand (alpha) * (y2 - y1) = x2 - x1 = x3 - x4;
1567 fill get_subpath (circle, left, z2 - z1, z1)
1568 -- get_subpath (circle, z2 - z1, right, z2)
1569 -- get_subpath (circle, right, z4 - z3, z3)
1570 -- get_subpath (circle, z4 - z3, left, z4)
1573 currentpicture := currentpicture shifted (width/2, 0);
1575 % labels (1, 2, 3, 4);
1579 fet_endgroup ("noteheads");