musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.17k stars 2.64k forks source link

Header / footer text height depends on the characters #20861

Closed krasko78 closed 9 months ago

krasko78 commented 9 months ago

Issue type

Engraving

Bug description

This is a cosmetic one and could be by design but thought I'd share it as it might be easy to fix or it could be hiding a more general text height calculation problem in MU. The height and vertical position of each header/footer text depend on the actual characters.

Steps to reproduce

  1. Go to Style -> Format -> Header/Footer.
  2. Check the "Header" checkbox and in any of the text boxes (left, middle, right) enter for example "waa".
  3. Then add characters that go higher than "waa" such as a capital letter "A" or lower than "waa" such as "p" so that "waa" becomes "waaA" or "waap" or "waaAp".
  4. Repeat for the footer.

ACTUAL: The text in the header / footer moves up and down depending on the characters entered and their actual heights. In the case of a header, the content below the header text is also shifted with the header (which could cause a complete layout change in some extreme cases due to inability to fit the same content on the page anymore). EXPECTED: One line of text should have the same height and vertical position no matter the characters.

The slight inconvenience from this bug is that the left, middle and right texts, if present, both in the header and the footer, are not always perfectly aligned vertically depending on the characters they contain. For example, in my footers I set the left text to the piece title and the right text to the page number. Since the page numbers are only digits that do not go below the base line, if my piece title contains a lowercase "p" for example, then the title in the footer ends up a few pixels higher than the page number to its right (the pixes by which the "p" extends below the baseline). In my footers this is not easily noticeable due to the large spacing between the title and the page number but see the screenshot below for another example demonstrating well the issue.

Screenshots/Screen recordings

image

MuseScore Version

4.2

Regression

I don't know

Operating system

Windows 10

Additional context

No response

worldwideweary commented 9 months ago

Fwiw, this is similar/equiV. behavior within 3.6.2, and who knows how far back: image

oktophonie commented 9 months ago

In MU1 and MU2 text would be bottom-aligned to the descender position in its frame: image So the presence or absence of descenders in the text would make no difference. In MU3 this changed, so that it effectively uses the bounding box of the specific text, meaning that this inconsistency arises.

Either we can return to the pre-MU3 behaviour, or (which I think would be better for achieving consistent alignment) have the baseline of the text at the bottom of the frame, which is what is normally encountered in other software, e.g. here in InDesign: image

In any case, this is effectively a duplicate of https://github.com/musescore/MuseScore/issues/15930