#include "international.hh"
#include "item.hh"
#include "output-def.hh"
+#include "paper-column.hh"
#include "pitch.hh"
#include "stencil.hh"
return SCM_UNSPECIFIED;
}
+MAKE_SCHEME_CALLBACK (Accidental_interface, pure_height, 3);
+SCM
+Accidental_interface::pure_height (SCM smob, SCM start_scm, SCM)
+{
+ Item *me = dynamic_cast<Item*> (unsmob_grob (smob));
+ int start = scm_to_int (start_scm);
+ int rank = me->get_column ()->get_rank ();
+
+ bool visible = to_boolean (me->get_property ("forced"))
+ || !unsmob_grob (me->get_object ("tie"))
+ || rank != start + 1; /* we are in the middle of a line */
+
+ return visible ? Grob::stencil_height (smob) : ly_interval2scm (Interval ());
+}
+
vector<Box>
Accidental_interface::accurate_boxes (Grob *me, Grob **common)
{
Font_metric *fm = Font_interface::get_default_font (me);
SCM alist = me->get_property ("glyph-name-alist");
- SCM glyph_name = ly_assoc_get (me->get_property ("alteration"),
- alist, SCM_BOOL_F);
+ SCM alt = me->get_property ("alteration");
+ SCM glyph_name = ly_assoc_get (alt, alist, SCM_BOOL_F);
if (!scm_is_string (glyph_name))
{
- me->warning ("Could not find glyph-name for alteration");
+ me->warning (_f ("Could not find glyph-name for alteration %s",
+ ly_scm2rational (alt).to_string ().c_str ()));
return SCM_EOL;
}