- else if (correct_stem_dirs && stem_dirs[LEFT] *stem_dirs[RIGHT] == UP)
- {
- /*
- Correct for the following situation:
-
- X X
- | |
- | |
- | X |
- | | |
- ========
-
- ^ move the center one to the left.
-
-
- this effect seems to be much more subtle than the
- stem-direction stuff (why?), and also does not scale with the
- difference in stem length.
-
- */
-
-
- Interval hp = head_posns[LEFT];
- hp.intersect (head_posns[RIGHT]);
- if (!hp.is_empty ())
- return ;
-
- Direction lowest =
- (head_posns[LEFT][DOWN] > head_posns[RIGHT][UP]) ? RIGHT : LEFT;
-
- Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP] ;
- Real corr = robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0);
- corr = (delta <= 1) ? 0.0 : 0.25;
-
- correction= -lowest * corr ;
- }
+ else if (stem_dirs[LEFT] * stem_dirs[RIGHT] == 1)
+ correction = same_direction_correction (me, head_posns);