+ shifted (0.10 wd + linea_width / 2, 0);
+ fi;
+ fet_endchar;
+enddef;
+
+
+def plica_char (expr verbose_name, internal_name,
+ d_up, mag) =
+ fet_beginchar (verbose_name, "s" & internal_name);
+ save a_b, b_h, a_w;
+
+ a_b := 1.54; % b_h * a_b / a_w = wd / ht
+ b_h := 0.85;
+ a_w := 1.09;
+
+ save a, beta, ht, wd;
+
+ ht# = noteheight# * mag;
+ 2 beta = ht# * b_h;
+ a = beta * a_b;
+ wd# = 2 a / a_w;
+ black_notehead_width# := wd#;
+
+ % direction
+ save d_, d_sign;
+ pair d_;
+
+ if d_up:
+ d_ := up;
+ d_sign := 1;
+ else:
+ d_ := down;
+ d_sign := -1;
+ fi;
+
+ % convexity and eccentricity
+ save convexity, eccentricity;
+
+ convexity# := d_sign * -0.10 ht#;
+ eccentricity# := d_sign * -0.12 ht#;
+
+ % y shift offset
+ save yoffs;
+
+ yoffs# := -0.11 ht#;
+
+ define_pixels (convexity, eccentricity, yoffs, ht, wd);
+
+ pickup pencircle scaled linethickness;
+
+ save height, yoffs_bt, p, circle, circle_r;
+ path p, circle, circle_r;
+
+ height# = 0.47 ht#;
+ yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
+
+ define_pixels (height, yoffs_bt);
+
+ circle := fullcircle scaled linethickness;
+
+ x1 = x6;
+ x2 = x5;
+ x3 = x4;
+ y1 + height = y6;
+ y2 + height = y5;
+ y3 + height = y4;
+
+ save box_top, box_bt;
+
+ z1 = (0.00 wd + linethickness / 2, yoffs_bt);
+ z2 = (0.21 wd, yoffs_bt + convexity);
+ z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
+ box_top# = height# + yoffs_bt# +
+ max (0, convexity#, eccentricity#);
+ box_bt# = yoffs_bt# +
+ min (0, convexity#, eccentricity#);
+ p = z1
+ .. z2{right}
+ .. z3
+ -- z4
+ .. z5{left}
+ .. z6
+ -- cycle;
+
+ labels (1, 2, 3, 4, 5, 6);
+
+ save dirs;
+ pair dirs[];
+
+ dirs12 := direction (0 + epsilon) of p;
+ dirs2 := direction 1 of p;
+ dirs32 := direction (2 - epsilon) of p;
+ dirs45 := direction (3 + epsilon) of p;
+ dirs5 := direction 4 of p;
+ dirs65 := direction (5 - epsilon) of p;
+
+ fill get_subpath (circle, down, dirs12, z1)
+ .. (bot z2){dirs2}
+ .. get_subpath (circle, dirs32, up, z3)
+ -- get_subpath (circle, up, dirs45, z4)
+ .. (top z5){dirs5}
+ .. get_subpath (circle, dirs65, down, z6)
+ -- cycle;
+
+ pickup pencircle scaled 0.6 linethickness;
+
+ save stem_bt;
+
+ set_char_box (0.00 wd#, 0.42 wd#,
+ max (0, -box_bt#) + linethickness# / 2,
+ max (0, box_top#) + linethickness# / 2);
+
+ fet_endchar;
+enddef;
+
+
+def epiphonus_char (expr verbose_name, internal_name,
+ left_stem, d_up, down_shift, mag) =
+ fet_beginchar (verbose_name, "s" & internal_name);
+ save a_b, b_h, a_w;
+
+ a_b := 1.54; % b_h * a_b / a_w = wd / ht
+ b_h := 0.85;
+ a_w := 1.09;
+
+ save a, beta, ht, wd;
+
+ ht# = noteheight# * mag;
+ 2 beta = ht# * b_h;
+ a = beta * a_b;
+ wd# = 2 a / a_w;
+ black_notehead_width# := wd#;
+
+ % direction
+ save d_, d_sign;
+ pair d_;
+
+ if d_up:
+ d_ := up;
+ d_sign := 1;
+ else:
+ d_ := down;
+ d_sign := -1;