Stencil
parenthesize (Grob*me, Stencil m)
{
- Stencil open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-leftparen"));
- Stencil close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-rightparen"));
+ Stencil open = Font_interface::get_default_font (me)->find_by_name ("accidentals.leftparen");
+ Stencil close = Font_interface::get_default_font (me)->find_by_name ("accidentals.rightparen");
+
m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0,0);
m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0,0);
}
Array<Box>
-Accidental_interface::accurate_boxes (Grob *a,Grob**common)
+Accidental_interface::accurate_boxes (Grob *a, Grob**common)
{
Box b;
b[X_AXIS] = a->extent (a, X_AXIS);
{
SCM cstyle = a->get_property ("cautionary-style");
parens = ly_c_equal_p (cstyle, ly_symbol2scm ("parentheses"));
-
}
SCM accs = a->get_property ("accidentals");
SCM scm_style = a->get_property ("style");
- if (!ly_c_symbol_p (scm_style)
+ if (!scm_is_symbol (scm_style)
&& !parens
&& scm_ilength (accs) == 1)
{
- if (ly_scm2int (ly_car (accs)) == FLAT)
+ if (scm_to_int (scm_car (accs)) == FLAT)
{
Box stem = b;
Box bulb = b;
case SHARP: return "mensural1";
}
- if (style == "neo_mensural")
+ if (style == "neomensural")
style = ""; // currently same as default
if (style == "default")
style = "";
SCM scm_style = me->get_property ("style");
String style;
- if (ly_c_symbol_p (scm_style))
+ if (scm_is_symbol (scm_style))
{
style = ly_symbol2string (scm_style);
}
Font_metric *fm = 0;
if (smaller)
{
- SCM ac = Font_interface::text_font_alist_chain (me);
- ac = scm_cons (scm_cons (scm_cons
- (ly_symbol2scm ("font-size"),
- scm_int2num (-2)), SCM_EOL),
- ac);
- fm = select_font (me->get_paper (), ac);
+ SCM ac = Font_interface::music_font_alist_chain (me);
+ /*
+ TODO: should calc font-size by adding -2 to current font-size
+ */
+ ac = scm_cons (scm_list_1 (scm_cons
+ (ly_symbol2scm ("font-size"),
+ scm_int2num (-2))),
+ ac);
+ fm = select_font (me->get_layout (), ac);
}
else
fm = Font_interface::get_default_font (me);
Stencil mol;
for (SCM s = me->get_property ("accidentals");
- ly_c_pair_p (s); s = ly_cdr (s))
+ scm_is_pair (s); s = scm_cdr (s))
{
- int alteration = ly_scm2int (ly_car (s));
+ int alteration = scm_to_int (scm_car (s));
String font_char = get_fontcharname (style, alteration);
- Stencil acc (fm->find_by_name ("accidentals-" + font_char));
+ Stencil acc (fm->find_by_name ("accidentals." + font_char));
if (acc.is_empty ())
{
}
-
+/*
+ TODO: should move inside-slur into item?
+
+ */
ADD_INTERFACE (Accidental_interface, "accidental-interface",
"a single accidental",
- "cautionary cautionary-style style tie accidentals");
+ "inside-slur cautionary cautionary-style style tie accidentals");