Package: musescore2 / 2.3.2+dfsg4-16

upstream/fix-accidental-paren-pos.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: honour symbol advance width from font when drawing accidentals
 more specifically, accidentals in parenthesēs (or other enclosing
 symbols) now have the advance width of the enclosing glyph and the
 glyph from the accidental itself honoured fixing asymmetric render
 of a parenthesised ♭
Author: mirabilos <m@mirbsd.org>
Forwarded: https://github.com/musescore/MuseScore/pull/6759
Applied-Upstream: v3.6, commit:1d81510cdaa67d8787067c0774674bcbaedbb11c

--- a/libmscore/accidental.cpp
+++ b/libmscore/accidental.cpp
@@ -331,22 +331,23 @@ void Accidental::layout()
       if (_small)
             m *= score()->styleD(StyleIdx::smallNoteMag);
       setMag(m);
+      qreal x = 0;
 
       m = magS();
       if (_hasBracket) {
             SymElement e(SymId::accidentalParensLeft, 0.0);
             el.append(e);
             r |= symBbox(SymId::accidentalParensLeft);
+            x += symAdvance(SymId::accidentalParensLeft);
             }
 
       SymId s = symbol();
-      qreal x = r.x()+r.width();
       SymElement e(s, x);
       el.append(e);
       r |= symBbox(s).translated(x, 0.0);
 
       if (_hasBracket) {
-            x = r.x()+r.width();
+            x += symAdvance(s);
             SymElement e(SymId::accidentalParensRight, x);
             el.append(e);
             r |= symBbox(SymId::accidentalParensRight).translated(x, 0.0);