+
+def draw_comma =
+ save alpha, thick, thin, ht;
+
+ alpha := 35;
+ thin# = 1.2 linethickness#;
+ thick# = 3 linethickness#;
+ ht# = .6 staff_space#;
+ define_pixels (thin, thick, ht);
+
+ set_char_box (0, .5 staff_space#, ht#, ht#);
+
+ penpos1 (thick, alpha);
+ penpos2 (thick, alpha + 90);
+ penpos3 (thin, 180 - alpha);
+ penpos4 (thin, 90 - alpha);
+
+ x3r = 0;
+ x1l = x3l;
+ y2r = -y4l = h;
+ z1 = z2;
+ z3 = z4;
+
+ fill z1l{dir (alpha + 90)}
+ .. z2r{dir alpha}
+ .. z1r{dir (alpha - 90)}
+ .. z3l{dir (270 - alpha)}
+ .. z4l{dir (180 - alpha)}
+ .. z3r{dir (90-alpha)}
+ .. cycle;
+enddef;
+
+
+fet_beginchar ("Right Comma", "rcomma");
+ draw_comma;
+ penlabels (1, 2, 3, 4);
+fet_endchar;
+
+
+fet_beginchar ("Left Comma", "lcomma");
+ draw_comma;
+ xy_mirror_char;
+fet_endchar;
+
+
+def draw_varcomma =
+ save thick, thin, ht, wd, alpha;
+
+ alpha := 35;
+ thin# = 1.2 linethickness#;
+ thick# = 3 linethickness#;
+ ht# = .6 staff_space#;
+ wd# = .25 staff_space#;
+ define_pixels (thin, thick, ht, alpha);
+
+ set_char_box (wd#, wd#, ht#, ht#);
+
+ z1 = (-b, -d);
+ z2 = (w, h);
+
+ draw_brush (z1, thin, z2, thick);
+enddef;
+
+
+fet_beginchar ("Right Varied Comma", "rvarcomma");
+ draw_varcomma;
+ labels (1, 2);
+fet_endchar;
+
+
+fet_beginchar ("Left Varied Comma", "lvarcomma");
+ draw_varcomma;
+ xy_mirror_char;
+fet_endchar;
+
+
+thick# := 1/24 designsize;
+define_blacker_pixels (thick);
+
+rthin := 0.075 * staff_space + 0.5 linethickness;
+rthick := 2 thick + rthin;
+
+
+def draw_arpeggio =
+ save alpha;
+ save ne, nw, se, sw;
+ save x, y;
+ pair ne, nw, se, sw;
+
+ alpha := -40;
+
+ nw = dir (alpha + 180);
+ ne = dir (alpha + 90);
+ se = dir alpha;
+ sw = dir (alpha - 90);
+
+ penpos1 (rthin, alpha + 90);
+ penpos2 (5/4 rthick, alpha);
+ penpos3 (3/4 rthick, alpha);
+ penpos4 (5/4 rthick, alpha);
+ penpos5 (rthin, alpha + 90);
+
+ z1 = (width / 2, height) - overshoot * se;
+ z2 = 2 [z4, (width / 2, height / 2)];
+ z3 = 1/2 [z2, z4];
+ x4 = 2/8 staff_space;
+ y4 = rthin;
+
+ z5 = 2 [z1, (width / 2, height / 2)];
+ z6 = z2l + 1/2 rthin * sw;
+ z7 = z4l + 1/2 rthin * sw + 1/2 rthin * se;
+ z8 = 2 [z6, (width / 2, height / 2)];
+ z9 = 2 [z7, (width / 2, height / 2)];
+
+ fill z1l{se}
+ -- z6
+ .. z3l
+ .. z7{se}
+ -- z5l
+ .. z5r{nw}
+ -- z8
+ .. z3r
+ .. z9{nw}
+ -- z1r
+ .. cycle;
+enddef;
+
+
+fet_beginchar ("Arpeggio", "arpeggio");
+ save height, overshoot, width;
+ height# = staff_space#;
+ width# = 0.8 height#;
+ overshoot# = 0.25 staff_space#;
+ define_pixels (height, overshoot, width);
+
+ set_char_box (0, width#, 0, height#);
+ draw_arpeggio;
+ penlabels (range 1 thru 9);
+
+ draw_staff (-2, 2, 0.0);
+fet_endchar;
+
+
+%
+% Extendable Trill symbol.
+% Not yet used
+% Rename me to Trill, rename Trill to Tr?
+%
+
+fet_beginchar ("Trill_element", "trill_element");
+ save height, overshoot;
+ height# = staff_space#;
+ width# = 0.8 height#;
+ overshoot# = 0.25 staff_space#;
+ define_pixels (height, overshoot, width);
+
+ set_char_box (0, height#, 0, width#);
+ draw_arpeggio;
+
+ currentpicture := currentpicture shifted -(width / 2, height / 2);
+ currentpicture := currentpicture rotated 90;
+ currentpicture := currentpicture shifted (height / 2, width / 2);
+fet_endchar;
+
+
+%
+% Arpeggio arrow by Chris Jackson <chris@fluffhouse.org.uk>
+%
+
+def draw_arpeggio_arrow =
+ save thinness, height, width, overshoot;
+ save nw, ne, se, sw;
+ save alpha;
+ save before_left, before_right, after_left, after_right;
+ save u_left, v_left, u_right, v_right;
+ pair nw, ne, se, sw;
+ path before_left, before_right, after_left, after_right;
+
+ height# = staff_space#;
+ width# = 0.8 height#;
+ overshoot# = 0.25 staff_space#;
+ define_pixels (height, overshoot, width);
+
+ set_char_box (0, width#, 0, height#);
+
+ alpha := -40;
+ nw = dir (alpha + 180);
+ ne = dir (alpha + 90);
+ se = dir alpha;
+ sw = dir (alpha - 90);
+
+ penpos1 (rthin, alpha + 90);
+ penpos2 (5/4 rthick, alpha);
+ penpos3 (5/4 rthick, 0);
+
+ z1 = (width / 2, height) - overshoot * se; % numbering is consistent
+ % with the arpeggio symbol
+ z2 = 2 [z4, (width / 2, height / 2)];
+ z3 = (0.5 width, 0.5 height);
+ z4 = (0.25 staff_space, rthin);
+ z6 = z2l + 1/2 rthin * sw;
+ z9 = (width / 2, height) + overshoot * se;
+
+ pickup pencircle scaled vround (0.5 rthin);
+
+ bot z10 = (0.5 w, 0);
+ lft z11 = (0.5 w - hround (0.8 w), 0.8 h);
+ rt z12 = (0.5 w + hround (0.8 w), 0.8 h);
+
+ before_left := z1l
+ -- z6{z6 - z1l}
+ .. {down}z3l;
+ after_left := (z3 + (0, -0.25 rthin / cosd (angle (nw))))
+ -- (z11 + 0.25 rthin * ne);
+ (u_left, v_left) = before_left intersectiontimes after_left;
+
+ before_right := (z12 + 0.25 rthin * nw)
+ -- (z3 + (0, -0.25 rthin / cosd (angle (nw))));
+ after_right := z3r{up}
+ .. z9{z1r - z9}
+ -- z1r;
+ (u_right, v_right) = before_right intersectiontimes after_right;
+
+ fill subpath (0, u_left) of before_left
+ .. subpath (v_left, infinity) of after_left
+ .. top z11
+ .. lft z11
+ .. {dir -50}(z11 + 0.25 rthin * sw)
+ .. (z10 + 0.25 rthin * sw){dir -70}
+ .. bot z10
+ .. {dir 70}(z10 + 0.25 rthin * se)
+ .. (z12 + 0.25 rthin * se){dir 50}
+ .. rt z12
+ .. top z12
+ .. subpath (0, u_right) of before_right
+ .. subpath (v_right, infinity) of after_right
+ .. cycle;
+
+ % mf doesn't handle pixel dropouts in outline objects, so we use
+ % `draw' if not called by mpost
+ if not known miterlimit:
+ pickup pencircle scaled 0.7 rthin;
+ draw z1
+ -- (z9 + 0.5 rthin * dir (alpha - 90));
+ fi;
+enddef;
+
+
+fet_beginchar ("Arpeggio arrow down", "arpeggio.arrow.M1");
+ draw_arpeggio_arrow;
+ penlabels (range 1 thru 12);
+fet_endchar;
+
+
+fet_beginchar ("Arpeggio arrow up", "arpeggio.arrow.1");
+ draw_arpeggio_arrow;
+ currentpicture := currentpicture scaled -1
+ shifted (w - feta_eps, h - feta_eps);
+fet_endchar;
+
+
+% Hmm