Vertical alignment of pedal text to line too low

• Dec 3, 2014 - 07:08
Type
Functional
Severity
S4 - Minor
Status
closed
Project

1. Open attached score (produced in 1.3).

Expected result:
Vertical alignment of pedal text to line too low - Expected result.png

Actual result: The vertical alignment of the pedal text is too low to the line.
Vertical alignment of pedal text to line too low - Actual result.png

Using MuseScore 2.0 Nightly Build 28b5daf - Mac 10.7.5.


Comments

Not *quite* so simple.

There is no separate "Pedal" text style - pedal lines use the generic "Text Line" style, which is vertically centered to the line and presumably should stay that way. So there is not a single clean way of fixing this.

One approach would be too introduce a new "Pedal" text style, set to baseline alignment. I'm not crazy about introducing a new style, and even if we did, we'd have to somehow deal with the width of the pedal line - the text should align with the *bottom*, not the top, of line. We could hard code that value into the text style, or we could alter the layout of pedal lines so the anchor point is the bottom rather than top of the line.

Another approach would be to force alignment to baseline during layout, and then we could calculate the appropriate Y offset based on line width then. But then we lose the ability to override this manually.

Another approach would be to set the alignment explicitly to baseline, and calculate an appropriate Y offset based on line width, when setting the initial text for a pedal line. This preserves the ability to override these vaues later. But it doesn't help existing scores created in previous 2.0 builds, unless we bump the version number and add special handling.

To me, this is worth fixing, but not worth introducing major changes over. I coded up the last of these; just a few lines added to TextLine::createBeginTextElement(). I think that or introducing a new text style that is explicitly set to baseline and with an explict Y offset set to the default line width is probably the way to go. The new text style, is, I suppose, best, but I kind of resist adding a new style at this point.