MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4] Fix dynamic symbols when Musical Text font does not match the Musical Symbols font

Open Jojo-Schmitz opened this issue 2 years ago • 15 comments

after #9359 and #9395 and as discussed there.

Sample scores attached (from the 3.x vtests): vtest.zip

Jojo-Schmitz avatar Oct 11 '21 17:10 Jojo-Schmitz

@DmitryArefiev please check this one

vpereverzev avatar Oct 29 '21 18:10 vpereverzev

Has this been investigated?

RobFog avatar Nov 25 '21 12:11 RobFog

I believe the vtests differences are expected, 4 of the 5 are rather small differences, and the big difference seems due to the ref being simply wrong, before: image after: image Here clearly the after image is expected, it is MuseJazz after all. The other smaller diffs most probably also are due to the dynamics taking the Musical fonts dynamics rather the Musical Text font ones, which is exactly what this PR is trying to fix, (only that the differences between Emmentaler Text resp. Gonville Text and Leland Text are much smaller than those to MuseJazz Text).

So I believe a vtests label is in order here. These diffs rather prove that this PR is needed.

They didn't show though until the recent rebase, but that's just because vtests are now actually working ;-)

Jojo-Schmitz avatar Dec 15 '21 14:12 Jojo-Schmitz

It is not just pre-3.x dynamics actually, but all dynamics, even those from 4.x. A score with dynamics where the Musical Symbol font (e.g. Leland) does not match the Musical Text font (e.g. MuseJazz Text), shows the dynamics in the Musical Text font (e.g. Leland Text) that matches the Musical Symbols font (e.g. Leland).

This PR fixes that by still using the dynamics from the Musical Symbols font, as per #9359, but deriving the name from the configured Musical Text font rather than taking that of the configured Musical Symbols font

Jojo-Schmitz avatar Dec 21 '21 12:12 Jojo-Schmitz

This behaviour seems potentially misleading to me, obscuring the fact the the dynamic symbols always come from a Musical Symbols font, not a Musical Text font.

If we want to allow the font used for dynamics to not match that used for the rest of the musical symbols, it would be better to have it independently configurable ("Dynamics font" or similar, with the available options being the available Musical Symbols fonts). That would also avoid changes of font during migration.

oktophonie avatar Dec 21 '21 13:12 oktophonie

Well, up to that PR I mentioned above dynamics had always been taken from the Musical Text font (just like for tempo text for example), and the change was IMHO only for the better centering of them, using their optical center. But if MuseScore 4 is really supposed to use the Musical Symbols font now, we'd at least need a compatibility fix for MuseScore 3 and earlier

Jojo-Schmitz avatar Dec 21 '21 13:12 Jojo-Schmitz

The initial impetus for the change was to be able to use the opticalCenter, but more importantly is also to confirm with the concepts in SMuFL of what the Symbol vs Text fonts are for. Dynamics are to be thought of as music symbols rather than text symbols (somewhat counter-intuitively, admittedly), and as such their proportions in the Musical Symbols font are determined so that they appear the right size alongside all the other musical symbols.

So, yes, MU4 is definitely to use a Musical Symbols font for dynamics in all cases. That doesn't mean that the font absolutely must match the font used for the rest of the music symbols (though I'd argue that in the vast majority of cases it should).

oktophonie avatar Dec 21 '21 13:12 oktophonie

Understood and nothing this PR is changing, it still uses the Music Symbols font for dynamics, but derives the name of if from the Musical Text font in effect for that score. It might by for the benefit of a minority of casaes, those whe these fonts are different, but still, those do exist.

Jojo-Schmitz avatar Dec 21 '21 14:12 Jojo-Schmitz

Except that if the user sets Musical symbols font to Bravura but Musical text font to Leland Text (for example), the dynamics should come from Bravura, not from Leland.

oktophonie avatar Dec 21 '21 14:12 oktophonie

Which it didn't do before that change in the above mentioned PR and therefore should not after.

At the very least not for pre-4.x scores

Jojo-Schmitz avatar Dec 21 '21 14:12 Jojo-Schmitz

It should do it after. That's the point. If you want to accommodate the few scores where the dynamics come from a different font, it needs to be independently configurable, as I said.

oktophonie avatar Dec 21 '21 14:12 oktophonie

No need for it to be configurable, just render pre 4.x scores the same as before, in this respect.

If not even that, the corresponding 4 vtests should get removed, as they now don't show what they are (or rather: were) intended to show. The test are emmentaler-text-3, gonville-text-3, bravura-text-3 (the only one not failing) and musejazz-text-3, the latter being the worst failure, see further up (there are no corresponding tests for Petaluma or Leland)

Jojo-Schmitz avatar Dec 21 '21 14:12 Jojo-Schmitz

This seems to be stuck in milestone 45 which was closed a long time ago?

RobFog avatar Jan 10 '22 10:01 RobFog

As far as I can tell this issue is still valid (even after today's rebase) and this PR still resolves it, with the very same vtest differences, one of which (see above) outlines the issue and its fix very clearly, while the other vtests show relative minor differences, but only due to the fact that the dynamics between Bravura, Emmentaler and Gonville are looking quite similar (there's no test showing Leland or Petaluma, as mentioned earlier), so they equally demonstrate the neccessity of this fix.

Jojo-Schmitz avatar May 10 '22 14:05 Jojo-Schmitz

Still looks convincing to me, MuseJazzText: musejazz-text-3-1 diff

Also Ottavas, IMHO that bold italic numbers are desired, but currently not happening, not on these vtests at least: line-2-1 diff and line-4-1 diff

And to make it clear: this PR (still) uses the Musical Symbol Font for these dynamics (and also ottavas), but derives its name from the Musical Text Font.

Jojo-Schmitz avatar Nov 09 '22 14:11 Jojo-Schmitz

Closing as we're working on a holistic solution for this.

oktophonie avatar Mar 22 '23 13:03 oktophonie

Oh well, after 1 1/2 years of basically having been ignored...

I do admit though, that my solution is a bit hacky.

Jojo-Schmitz avatar Mar 22 '23 13:03 Jojo-Schmitz