Wrong vertical position of breath mark

• Jan 3, 2018 - 14:53
Reported version
3.0
Priority
P1 - High
Type
Functional
Severity
S4 - Minor
Status
closed
Regression
No
Workaround
No
Project

Regression in visual test breath-1:

Vertical position of breath mark is wrong.

Expected:
breath-1-ref.png

Actual:
breath-1-1.png


Comments

The visual tests are using the MScore font, which is based on LilyPond's Emmentaler font. The symbol for the breath mark in Emmentaler has a unique appearance, and it is intended to be positioned such that it intersects the top staff line. Other fonts have a symbol that more closely resembles the comma in the palette, and this symbol is intended to be positioned above the staff.

Commit f09f554 was meant to fix this issue, but it repositioned all of the non-caesura breath marks for all of the fonts, rather than just the one breath mark in the MScore font. Breath::layout() should probably instead look like this:

void Breath::layout()
      {
      bool palette = (track() == -1);
      if (!palette) {
            if (isCaesura())
                  setPos(x(), spatium());
            else if ((score()->styleSt(Sid::MusicalSymbolFont) == "Emmentaler") && (symId() == SymId::breathMarkComma))
                  setPos(x(), 0.5 * spatium());
            else
                  setPos(x(), -0.5 * spatium());
            }
      setbbox(symBbox(_symId));
      }

This also fixes the problem of the symbols not being centered vertically in the palette.

I thought about adjusting the symbol's position in the MScore font itself, but we are already repositioning all of the breath marks anyway during layout. After giving the matter much thought, I have decided that the solution I showed above makes more sense.

Status PR created fixed

Looks like the issue wasn't closed automatically after the merging of the pull request?

Fix version
3.0.2