Blank lines ignored at top of text elements

• Jul 10, 2020 - 18:51
Reported version
3.x-dev
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

This is definitely a regression and a serious one in that existing scores may depend on the current behavior to accomplish certain layout effects. It was discovered in a score that uses blank lines in an instrument name to force it it to center a staff name between two instruments, but it's easy to reproduce this in a lot of other less esoteric cases.

1) default empty score
2) edit title to add a blank line before the title
3) exit edit mode

Result: the title jumps up to the top of the frame. The blank line is still there, it's just being ignored to the purpose of aligning the top. So, basically, the box is too tight. I might have thought I could trick MuseScore into not doing this by adding a space to that blank line, but no such luck.

So this affects the positioning of any element with top or center alignment. It also affects how frames are drawn. So another way to reproduce:

4) click the rest in measure 1
5) ctrl+M to add a rehearsal mark
6) type a blank line then a letter
7) exit edit mode

Result: the blank line disappears, and the rehearsal mark shows the frame around the letter only. Again, the blank line is still there, it is just outside the frame.

Blank lines below the last line of regular text are not affected, they work just fine.


Comments

I think the fix may have introduced a different problem.
Attached is a score I made in 3.4.2.

Here is a picture of the titles as I want them and as I managed to get them in 3.4.2.

Title 3_4_2.png

I wanted the English translation to be in italics and so I added it as a separate text item with blank lines to make it sit below the Welsh title.

When I opened it in 3.5. beta the two title lay on top of each other, which is the problem described in this thread as I understand it. I can't currently reproduce this as I installed 3.5 RC which seems to have uninstalled 3.5 beta.

Now when I open it in 3.5 RC my English title has shifted down and is sitting in the middle of the top stave.

Title 3_5_RC.png

Attachment Size
Welsh Suite - Complete 01.mscz 84.98 KB

As far as I can see, this is correct. In older versions there was a bug that caused blank lines to be way too short, so people using that as a method of positioning things ended up adding too many of them. Now, blank lines are the correct height, meaning scores that added multipkle blank lines as a workaround for bugs in older versions will need to be updated. It shouldn't have taken four blank lines to get the look you wanted in 3.4.2, that was just because of the bug.

What discussed in this thread is something different, it only applied to blank lines at the top of a text item. Your blank lines are within the text item. Thus it should work the same in Beta and RC, but indeed, different from buggy older versions.

BTW, you will find a single blnak line now does what it should, which is add a normal-sized blank line. It's a little bigger than what you had before. Personally, I would probably leave it at that, but in general, if you're trying to position lines with a specific amount of space between them, much better to just add two of them (eg, two separate subtitles in this case) and position them directly and precisely.

No, my blank lines are at the start of the second text item - the one in Italics. I wasn't that particular about the spacing. I just wanted the italic version to sit below the non-italic version rather than on top of it.

I thought this thread was about a problem in 3.5 beta, rather than a problem in 3.4.2 and indeed that is what I saw in 3.5 beta. The blank lines were ignored, whereas they seemed to behave as expected in 3.4.2, or at least not mis-behave so much that I noticed it. Whatever, the current behaviour breaks what seems to have been the previous - up to 3.5 beta - behaviour. Something I need to look at when revisiting other scores I guess.

By "top" here, we mean the very top of the entire text item. That would mean, above your Welsh title. If you had put blank lines there, they would have disappeared in the beta, but that's fixed also now in the RC.

So again, what is happening is correct. You had added four blank lines in 3.4.2 as a workaround for a different (but indeed related) bug in that version. The bug is now fixed - blank lines are now the proper size. But that means your four blank lines are way too many for the effect you wanted to achieve. You will need to delete the extras. Or, as I said, don't rely on blank lines at all to position things, but instead add and position the elements separately. But if you were previously in the habit of relying on the bug where blank lines were way to small and then working around it by inserting multiple ones, you will indeed need to do something to update those scores.

Of course, what I should have done is added a two-line text item and then applied italic formatting to the second line Sometimes one misses the obvious.

Anyway the difference in behaviour, pre 3.5 beta, and post 3.5 beta is documented here now in case other users trip over it.

Fix version
3.5.0