source file of the GNU LilyPond music typesetter
- (c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+
#include "font-interface.hh"
#include "item.hh"
#include "stencil.hh"
#include "pitch.hh"
/*
+
TODO: insert support for smaller cautionaries, tie-break-reminders.
Either here or in new-accidental-engraver.
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);
+ m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0, 0);
+ m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0, 0);
return m;
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface, after_line_breaking, 1);
SCM
Accidental_interface::after_line_breaking (SCM smob)
{
&& !parens
&& scm_ilength (accs) == 1)
{
- if (scm_to_int (ly_car (accs)) == FLAT)
+ if (scm_to_int (scm_car (accs)) == FLAT)
{
Box stem = b;
Box bulb = b;
return style + to_string (alteration);
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,print,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);
SCM
Accidental_interface::print (SCM smob)
{
if (smaller)
{
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_paper (), 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 = scm_to_int (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 ())
{
}
else
{
- mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1,0);
+ mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1, 0);
}
}