/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
SCM up_style = head_up->get_property ("style");
SCM down_style = head_down->get_property ("style");
if (merge_possible
- && (up_style == ly_symbol2scm ("fa") || up_style == ly_symbol2scm ("faThin"))
- && (down_style == ly_symbol2scm ("fa") || down_style == ly_symbol2scm ("faThin")))
+ && (scm_is_eq (up_style, ly_symbol2scm ("fa"))
+ || scm_is_eq (up_style, ly_symbol2scm ("faThin")))
+ && (scm_is_eq (down_style, ly_symbol2scm ("fa"))
+ || scm_is_eq (down_style, ly_symbol2scm ("faThin"))))
{
Offset att = Offset (0.0, -1.0);
head_up->set_property ("stem-attachment", ly_offset2scm (att));
if (i == 0)
offset = inner_offset;
- else if (shifts[i] == shifts[i - 1])
- {
- // Match the previous notecolumn offset,
- // but warn if the user did not set these equal shifts explictly
- if (!scm_is_number (sh))
- col->warning (_ ("ignoring too many clashing note columns"));
- }
- else if (extents[d][i][UP] > extents[d][i - 1][DOWN]
- && extents[d][i][DOWN] < extents[d][i - 1][UP])
- offset += 1.0; // fully clear the inner-voice heads
else
{
- // check if we cross the inner voice
- if (d * extents[d][i][-d] >= d * extents[d][i - 1][d])
+ bool explicit_shift = scm_is_number (sh);
+ if (!explicit_shift)
+ col->warning (_ ("this Voice needs a \\voiceXx or \\shiftXx setting"));
+
+ if (explicit_shift && shifts[i] == shifts[i - 1])
+ ; // Match the previous notecolumn offset
+ else if (extents[d][i][UP] > extents[d][i - 1][DOWN]
+ && extents[d][i][DOWN] < extents[d][i - 1][UP])
+ offset += 1.0; // fully clear the previous-notecolumn heads
+ else if (d * extents[d][i][-d] >= d * extents[d][i - 1][d])
offset += Stem::is_valid_stem (stems[d][i - 1])
- ? 1.0 : 0.5;
+ ? 1.0 : 0.5; // we cross the previous notecolumn
else if (Stem::is_valid_stem (stems[d][i]))
offset += 0.5;
+
// check if we cross the opposite-stemmed voices
if (d * extents[d][i][-d] < d * extent_union[-d][d])
offset = max (offset, 0.5);