- Paper_def* p= paper_l ();
- Real arc_height = p->get_var("bracket_arch_height");
- SCM at = gh_list (ly_symbol2scm ("bracket"),
- gh_double2scm (p->get_var("bracket_arch_angle")),
- gh_double2scm (p->get_var("bracket_arch_width")),
- gh_double2scm (arc_height),
- gh_double2scm (p->get_var("bracket_width")),
- gh_double2scm (height),
- gh_double2scm (p->get_var("bracket_arch_thick")),
- gh_double2scm (p->get_var("bracket_thick")),
- SCM_UNDEFINED);
-
- Real staff_space = p->get_var ("interline");
- Real h = height + 2 * arc_height;
- Box b (Interval (0, 1.5 * staff_space), Interval (-h/2, h/2));
- Molecule mol (b, at);
- mol.align_to (X_AXIS, CENTER);
- return mol;
+ SCM fam = scm_cons (ly_symbol2scm ("font-encoding"),
+ ly_symbol2scm ("fetaMusic"));
+
+ SCM alist = scm_list_n (fam, SCM_UNDEFINED);
+ Font_metric *fm = select_font (me->layout (), scm_list_n (alist, SCM_UNDEFINED));
+
+ Drul_array<Stencil> tips (fm->find_by_name ("brackettips.down"),
+ fm->find_by_name ("brackettips.up"));
+
+ Real thickness = robust_scm2double (me->get_property ("thickness"), 0.25);
+
+ Real overlap = 0.1 * thickness;
+
+ Box box (Interval (0, thickness),
+ Interval (-1, 1)
+ * (height / 2 + overlap));
+
+ Stencil bracket = Lookup::filled_box (box);
+ Direction d = DOWN;
+ do
+ bracket.add_at_edge (Y_AXIS, d, tips[d], -overlap);
+ while (flip (&d) != DOWN);
+ bracket = Stencil (box, bracket.expr ());
+
+ bracket.translate_axis (-0.8, X_AXIS);
+
+ return bracket;