Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10441 - Omit lyrics extender line if too short #10471

Merged
merged 2 commits into from
Feb 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/engraving/libmscore/lyricsline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,16 @@ void LyricsLineSegment::layout()
}

// MELISMA vs. DASHES
const double minMelismaLen = 1 * sp; // TODO: style setting
const double minDashLen = score()->styleS(Sid::lyricsDashMinLength).val() * sp;
const double maxDashDist = score()->styleS(Sid::lyricsDashMaxDistance).val() * sp;
double len = pos2().rx();
if (isEndMelisma) { // melisma
_numOfDashes = 1;
if (len < minMelismaLen) { // Omit the extender line if too short
_numOfDashes = 0;
} else {
_numOfDashes = 1;
}
rypos() -= lyricsLine()->lineWidth() * .5; // let the line 'sit on' the base line
// if not final segment, shorten it (why? -AS)
/*
Expand All @@ -429,9 +437,6 @@ void LyricsLineSegment::layout()
// set conventional dash Y pos
rypos() -= lyr->fontMetrics().xHeight() * score()->styleD(Sid::lyricsDashYposRatio);
_dashLength = score()->styleMM(Sid::lyricsDashMaxLength) * mag(); // and dash length
qreal len = pos2().x();
qreal minDashLen = score()->styleS(Sid::lyricsDashMinLength).val() * sp;
qreal maxDashDist = score()->styleS(Sid::lyricsDashMaxDistance).val() * sp;
if (len < minDashLen) { // if no room for a dash
// if at end of system or dash is forced
if (endOfSystem || score()->styleB(Sid::lyricsDashForce)) {
Expand Down