+ SCM staff_position = me->get_property ("staff-position");
+
+ if (!scm_is_number (staff_position))
+ {
+ // Staff position is somewhat icky regarding its definition for
+ // compatibility reasons. It is intended to be the baseline of
+ // a breve rest. However, when the staff space is more than
+ // single space (like with tablature), it looks better if all
+ // rests are actually hanging. So staff position, in reality,
+ // is the semi-breve position - 2. Everything else is
+ // calculated from there.
+ int dir = get_grob_direction (me);
+ Real pos = Rest::staff_position_internal (me, 0, dir);
+ me->set_property ("staff-position", scm_from_double (pos - 2));
+ }
+