Note spacing not accounting for accidental brackets

• Sep 30, 2014 - 07:37
Type
Functional
Severity
S4 - Minor
Status
closed
Project

My config: MuseScore f3f334f on Xubuntu 14.10. Results below are obtained with defaults settings (and so the default font).

Accidentals with brackets are not placed correctly:

accidentals-with-brackets.png

Without brackets, for comparison:

accidentals.png

There's not enough spacing before the opening bracket, so it touches the previous note.

Also, the distance between the accidental and the closing bracket is not always consistent. For example, see the double sharp in brackets. It seems a little bit shifted left compared to the sharp in brackets. Also, compare the flat in brackets with the double flat in brackets:

flat-double-flat-brackets.png


Comments

Title Accidentals with brackets are misplaced Note spacing not accounting for accidental brackets

Just changing the title to better reflect what is happening internally. The accidentals are actually placed correctly relate to the notes they are attached to. But the note-spacing algorithm isn't accounting for the brackets when deciding how much space is required to the left of the note.

Not really related to #21421: Notehead bracket collides with elements before notehead. That's more of a policy decision with pluses and minuses either way.

About the inconsistent distance between the accidental and the closing bracket, it's probably not related to this bug because it also happens without brackets for the distance between the accidental and its attached note. Example with flat and double flat:

flat-double-flat.png

It's like if some accidentals have more spacing to the right than others. It's just visually more evident when accidentals are in brackets.

Is it a bug with the font? Should I fill a new report about that?

Attachment Size
flat-double-flat.png 6.64 KB

Almost definitely not related. It could be the font itself allocates more leading to double flat than to flat, or it could be that Qt tends to round off font calculations. Check also with the other fonts (Bravura and Gonville). Regarding double sharp versus sharp, I think that's more of an optical illusion because the cross bars of the sharp sign happen to line up with the endpoints of the bracket. Maybe there an extra pixel or two, but not as much as it looks at first.

With Gonville and Gonville Text, brackets don't appear at all:

accidentals-with-brackets-gonville.png

With Bravura and Bravura Text, there's no bug. There are no spacing problems before the opening bracket and accidentals are not shifted left inside brackets (although brackets may be a little bit too close; for example, the closing bracket seems to touch the sharp):

accidentals-with-brackets-bravura.png

Note: I tested Gonville and Bravura with the latest commit e9f40af.

Status (old) active fixed

Yes, I think the basic issues raised here are all addressed. Reopen with specifics if you find some aspect of this to still be a problem.