Shortening notes too much leads to bad stem layout
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Regression
No
Workaround
No
Project
Steps to reproduce:
1) Create a score
2) Enter a quarter note
3) Press Q (half note duration) 6 times.
Result: stem looks bad:
Not sure which of these is the bug: that stem layout or the fact that MuseScore allows shortening notes so much but some of these is probably a bug.
After pressing Q five times all looks great.
OS: Debian GNU/Linux 9 (stretch), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: 64d3653
Comments
The code for adjusting the length of a stem to accommodate multiple flags does not do anything in the case of 6 or more flags. The switch statement in Chord::defaultStemLength() can be replaced with this generic formula
This produces fairly good results for fonts other than Emmentaler, which probably needs to be special-cased. But if there are more than 5 flags, the fallback font Bravura is used instead of Emmentaler. I will try to come up with a good formula for the Emmentaler font.
Well, it took a bit more special-casing, but I'm pretty happy with the result. I also fixed the glyphs for 128th note hooks in the mscore font so that they will align properly with the stem when using Emmentaler.
Before:
After:
See https://github.com/musescore/MuseScore/pull/4086 for the patch.
Is this obscured dot the same issue? This is from a current build.
It can be considered the same issue, since my patch addresses it as well. See my comment on the PR about using hookIdx versus _hook.
Fixed in branch master, commit 992f322277
fix #277565: Shortening notes too much leads to bad stem layout
Fixed in branch master, commit 7ca06db458
Merge pull request #4086 from mattmcclinch/277565-stem-length
fix #277565: Shortening notes too much leads to bad stem layout
Automatically closed -- issue fixed for 2 weeks with no activity.