Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support/use musical font files' x-offset for stems #25050

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz commented Oct 5, 2024

Resolves: #25088
Resolves: https://musescore.org/en/node/369769#comment-1261591 where it came up for 3.7. Needs special treatment for Bravura, Emmentaler (particularly bad metadata apparenty), Gonville, Leland, MuseJazz, Petaluma, these fonts' metadata seem to disargee with the stems being offset by half a stem width to the left for upstem notes/chords

Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 5, 2024
@Jojo-Schmitz Jojo-Schmitz force-pushed the musical-font-stem-x-offset branch 2 times, most recently from da6e991 to b9c14b8 Compare October 5, 2024 14:46
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 5, 2024
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 5, 2024
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 5, 2024
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 6, 2024
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 6, 2024
@Jojo-Schmitz Jojo-Schmitz force-pushed the musical-font-stem-x-offset branch 2 times, most recently from 0558ca3 to 96f0b26 Compare October 6, 2024 15:47
@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Oct 6, 2024

6 fonts (Bravura, Emmentaler, Gonville, Leland, MuseJazz and Petaluma, so basically all but the Finale ones) need some special, and different, treatment. Required quite a bit of fine tuning...

At least for Emmentaler, Gonville, Leland and MuseJazz (the latter 2 don't need special treatment in my MuseScore 3.7) we might be able to instead just fix their metadata.json and there esp. the stemDownNW and stemUpSE values of the affected noteheads, noteheadBlack and noteheadHalf, which would leave just Bravura and Petaluma needing some tweaks. Those might need to get reported upstream (to Steinberg).

Should we ever enable external fonts: the vast majority the ones I tested with (cap1800, Ekmelos, Finale Ash, Finale Engraver, Finale Jazz, Golden Age, Leipzig, Sebastian, Valerio, but not with AloisiusU, AloisiusGrooveU and Legato which has an issue with noteheadDoubleWhole) do work with the defaults. Special mention for Valerio, which actually triggered all this, as it is the only one I came accross so far that does not attach the stems either side of the notes, but basically centers them (for half notes and shorter) to the notehead and without this change here just doesn't look like it should look.

Attached sample scores for all the current fonts Mu4 support:
stem-samples.zip

@Jojo-Schmitz Jojo-Schmitz force-pushed the musical-font-stem-x-offset branch 3 times, most recently from 22bed5e to 4598da8 Compare October 6, 2024 17:38
@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Oct 6, 2024

Most vtest differences are minor and IMHO harmless and basically an expcted result of ther fine tuning.

These certainly are not:

  1. accidental-mirror-1
    accidental-mirror-1 diff
  2. arpeggio-2-1
    arpeggio-2-1 diff
  3. bravura-10-1
    bravura-10-1 diff
  4. chord-layout-11-1
    chord-layout-11-1 diff
  5. chord-layout-16-1
    chord-layout-16-1 diff
  6. chord-layout-21-1
    chord-layout-21-1 diff
  7. chord-layout-5-1
    chord-layout-5-1 diff
  8. chord-layout-9-1
    chord-layout-9-1 diff
  9. chord-layout-dots-2-1
    chord-layout-dots-2-1 diff
  10. chord-small-1
    chord-small-1 diff
  11. drumset-custom-1-1
    drumset-custom-1-1 diff
  12. emmentaler-10-1
    emmentaler-10-1 diff
  13. fermata-1
    fermata-1 diff
  14. gonville-10-1
    gonville-10-1 diff
  15. grace-4-1
    grace-4-1 diff
  16. layout-sequence-1-1
    layout-sequence-1-1 diff
    17; layout-sequence-2-1
    layout-sequence-2-1 diff
    ledger-lines-2-1 diff
    musejazz-10-1 diff
    read-206-custom-drumset-1-1 diff
    slash-1-1 diff
    slashed_chord-layout-12-1 diff
    slashed_chord-layout-7-1 diff
    slashed_grace-3-1 diff
    slashed_noteheadposition-1-1 diff
    slurs-1-1 diff
    slurs-11-2 diff
    slurs-17-1 diff
    slurs-19-1 diff
    slurs-3-1 diff
    slurs-4-1 diff
    slurs-6-1 diff
    slurs-6-2 diff
    staff-1-1 diff
    staff-offset-1 diff
    staff-scaling-1-1 diff
    tie-13-1 diff
    trem-cross-stave-1 diff
    tremolo-collision-1 diff
    tremolo-hooks-flat-1 diff
    tremolo-hooks-trad-1 diff
    tremolo-in-beam-1 diff
    valign-1-1 diff

@Jojo-Schmitz Jojo-Schmitz force-pushed the musical-font-stem-x-offset branch 3 times, most recently from 1e79177 to d97dd2d Compare October 6, 2024 21:59
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 7, 2024
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 7, 2024
@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Oct 8, 2024

I believe to have found a better way, in my 3.7 PR Jojo-Schmitz#672, by picking on the glyphs notehead_DoubleWhole, noteheadHalf, and noteheadBlack rather than the durations V_LONG, V_HALF and V_QUARTER and fix the metadata for Emmentaler and Gonville's stemUpSE settings for noteheadHalf and noteheadBlack, so only Bravura and Petaluma need special treatment, this should fix most of the issues shown above (leaving just slurs having an issue, as far as I can tell, and I'll try to tackle that). Should fix the other vtest issues and seems to for 3.x.

But I'm now having a hard time porting all this accross to master, without having to use more special treatment and for more fonts. Even the (identical) metadata changes for Emmentaler and Gonville don't work here?!?

Seems I'm missing something that changed in the rendering?
Is my idea of using stemUpSE for the place to attach a stem to entirely flawed?

I'll push what I have rebased and in a 2nd commit (also to check the vtests), please comment.

And y-offset the stems for long notes to interfere less with those notes' vertical bars at either edge
@Jojo-Schmitz Jojo-Schmitz force-pushed the musical-font-stem-x-offset branch from d97dd2d to 2dd7f25 Compare October 8, 2024 12:12
@Jojo-Schmitz Jojo-Schmitz force-pushed the musical-font-stem-x-offset branch from 2dd7f25 to 35f4cdc Compare October 8, 2024 12:29
@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Oct 8, 2024

It doesn't seem to make any significant difference with the vtests at all!? Issues with small and/or mirrored notes, single note tremolos and all kind of noteheads that this change shouldn't even touch!

Actually I don't really trust those vtests, loading the 'offending' vtest scores into my local build as well as into the artifact show them looking just fine (except for the slurs issue I have with Mu3 too, and on top the single note tremolo issue)!?!

Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 8, 2024
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support/use musical font files' x-offset for stems
1 participant