// c&p
Grob *stem = Note_column::get_stem (extremes[d]);
Grob * h = Stem::extremal_heads (stem)[dir];
-
Real y;
-
if (stem
&& get_grob_direction (stem) == dir
&& Stem::get_beam (stem))
y += dir * 0.5 * staff_space;
Grob * staff = Staff_symbol_referencer::get_staff_symbol (h);
- Real pos = 2.0 * (y - staff->relative_coordinate (common[Y_AXIS], Y_AXIS)) / Staff_symbol::staff_space (staff);
+ Real pos = 2.0 * (y - staff->relative_coordinate (common[Y_AXIS], Y_AXIS))
+ / Staff_symbol::staff_space (staff);
- /*
- start off staffline.
- */
+ /*
+ start off staffline.
+ */
if (fabs (pos - round (pos)) < 0.2
- && Staff_symbol_referencer::on_staffline (h, (int) rint (pos)))
+ && Staff_symbol_referencer::on_staffline (h, (int) rint (pos))
+ && Staff_symbol_referencer::line_count (h) -1 >= rint (pos)
+ )
y += staff_space * dir / 10 ;
return on_staffline (me, (int) rint (get_position (me)));
}
+/*
+ This does not take size into account.
+ maybe rename: on_virtual_staffline, on_staff_or_ledger_line?
+ */
bool
Staff_symbol_referencer::on_staffline (Grob *me, int pos)
{
int sz = line_count (me) - 1;
- return ((pos + sz) % 2) == 0 && abs (pos) <= sz;
+ return ((pos + sz) % 2) == 0;
}
Grob*
-
%%
%
% TODO: blot diameter should be fixed, not scalable.
%
code := 121;
-fet_beginchar ("dynamic z", "z", "dynz");
+fet_beginchar ("dynamic z", "z", "z");
set_char_box (0, .98 ex#, 0, 0.9 ex#);
save thin_thick, top_narrow, over_shoot;
code := 101;
-fet_beginchar("dynamic f", "f", "dynf");
+fet_beginchar("dynamic f", "f", "f");
set_char_box (0, 1.1 ex#, descender#, ex# + ascender#);
save left_angle, right_angle;
code := 114;
-fet_beginchar("dynamic s", "s", "dyns");
+fet_beginchar("dynamic s", "s", "s");
set_char_box (0, 17/24 ex#, 0, 1 ex#);
save left_angle, right_angle;
code := 111;
-fet_beginchar("dynamic p", "p", "dynp")
+fet_beginchar("dynamic p", "p", "p")
%
% TODO w really is 13/12 ex
% but should do kerning
%
code := 108;
-fet_beginchar("dynamic m", "m", "dynm");
+fet_beginchar("dynamic m", "m", "m");
set_char_box (0, 1.5 ex#, 0, 1.0 ex#);
% should share code with p for twiddle.
currenttransform := identity slanted ypart(dir(15));
-fet_beginchar("dynamic r", "r", "dynr");
+fet_beginchar("dynamic r", "r", "r");
set_char_box (0, .75 ex#, 0, 1ex#);