- int lines = Staff_symbol_referencer::line_count (me);
- int height = lines / 2; // little more than half of staff size
- if ((lines & 1) != (height & 1))
- height++; // ensure endings are centered in staff space
+ Interval ydim = Staff_symbol_referencer::staff_span (me);
+ ydim.widen (-0.25 * ydim.delta ());
+ for (UP_and_DOWN (i))
+ {
+ int const int_dim = (int) ydim[i];
+ if (int_dim == ydim[i]
+ && Staff_symbol_referencer::on_staff_line (me, int_dim))
+ ydim[i] += i;
+ }
+
+ ydim *= 1.0 / Staff_symbol_referencer::staff_space (me);