musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.32k stars 2.66k forks source link

Header Font Settings Reverting #25148

Open connorpagemusic opened 1 month ago

connorpagemusic commented 1 month ago

Issue type

Engraving bug (incorrect score rendering)

Description with steps to reproduce

For the last month or so (maybe since 4.4?), all of my headers and footers are resetting all formatting settings each time the file is opened, including Font, Font Size, and settings like bold/italic. If I change the settings they will look fine, but if I save, close, and reopen the program, it will be back to the default font. This is also not the saved default in the Style settings, but the default Style settings.

Also, when the header includes a coded page number (using $p in the header), the page number itself will stay in the default style settings and cannot be changed.

Supporting files, videos and screenshots

Screenshot of the page number not following formatting changes of the rest of the header.

Bug Report

What is the latest version of MuseScore Studio where this issue is present?

4.4.2

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

Windows 10

Additional context

No response

Checklist

oktophonie commented 1 month ago

In 4.4 we wanted to make it possible to style page numbers and copyright text (when inserted using the tags $p $P and $c $C) separately from the rest of header and footer text. So, we added two new styles, which you'll find in Style > Text styles > Page number and Copyright. This is described in the handbook.

In your case, you want it all styled the same, so all you need to do is make sure that the font settings are the same for Page number and for Header!

There is a bit of a complication in that if you put other text in the same header/footer field as one of these tags, the entire string will follow the style of the tag. That's a shortcoming we can't get around without some significant refactoring which we hope to do in 4.5.

Regardless of that: if your styling is not persisting through a save/reload, that is definitely a bug, but I can't reproduce it here. Could you please:

connorpagemusic commented 1 month ago

The quoted section below is the behavior I noticed, but it might be made irrelevant by something I noticed after writing it:

While I was testing this, I discovered something else that might be a bug. I went to test all of the below without $p in the header to see what would happen. When I remove it, everything saves properly and doesn't revert, and the Header style setting works as intended. However, after reloading the file, I can no longer click on the header, and therefore cannot edit it in the properties menu. I was able to reproduce this both ways - every time there was $p or $c I could click on it, otherwise I could not. The behavior resets on reload specifically, so if I remove $p I would still be able to click on the header until I reload the score. If I removed it then reloaded the file, formatting settings would also revert, but this time to the Header style setting. I'm wondering if I'm just not supposed to be able to click on the header in the first place, and that has to do with why edits made there don't actually save as intended.

*I didn't realize those two styles has been split, that's a smart feature!

I played around with it now that I knew to look for Page Number as well and I think I figured out what's going on. Depending on how I edit, one of three main things happens (the header is "$:workTitle: · Page $p"): *

  • Open the Style menu, change settings under the Header category -> No changes have any effect

  • Open the Style menu, change settings under the Page Number category -> All changes work and apply to entire header

  • Click directly on the header in the score and change settings in the Properties menu -> Changes apply everywhere except $p

I also found that I could change the settings for the whole header by changing the Page Number style to what I want $p to be, then click in the score and change the rest of it to something else. However, the parts below mostly nullify the usefulness of this workaround. As far as the reverting on reloading, I believe I figured that out where that was coming from as well. Every time I open a score, all formatting in the header will revert to whatever the Page Number style is saved as. In my use case this is fine because I want it all the same anyway and can just make sure to use Page Number instead of Header. However, that effectively means that all edits made by clicking on the header in the score will be reverted upon reload. I'm not sure if this is part of the complication with including tags in the header or not. As far as I could tell, all of this worked identically in the full score as well as in parts.

Either way, the knowledge of how the formatting is coded now does solve what I personally need for the projects I'm working on. I'm a huge fan of MuseScore though so I'm happy to contribute to improving it if there's anything else I can help with. I did include my amazing Test Score which I previously used to try out some of the new sounds - I confirmed that at least on my end, all of the above behavior is accurate and reproducible.

Thanks for all you do for MuseScore, and have a great day!

On Tue, Oct 15, 2024 at 5:05 AM Simon @.***> wrote:

In 4.4 we wanted to make it possible to style page numbers and copyright text (when inserted using the tags $p $P and $c $C) separately from the rest of header and footer text. So, we added two new styles, which you'll find in Style > Text styles > Page number and Copyright. This is described in the handbook https://musescore.org/en/handbook/4/header-and-footer#header-footer-style .

In your case, you want it all styled the same, so all you need to do is make sure that the font settings are the same for Page number and for Header!

There is a bit of a complication in that if you put other text in the same header/footer field as one of these tags, the entire string will follow the style of the tag. That's a shortcoming we can't get around without some significant refactoring which we hope to do in 4.5.

Regardless of that: if your styling is not persisting through a save/reload, that is definitely a bug, but I can't reproduce it here. Could you please:

  • explain how you are changing the styling
  • attach a sample file here? (put it in a .zip first)

— Reply to this email directly, view it on GitHub https://github.com/musescore/MuseScore/issues/25148#issuecomment-2413581098, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMCPVUVDJ64O5OIADTOIV63Z3TZI5AVCNFSM6AAAAABP32NRSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJTGU4DCMBZHA . You are receiving this because you authored the thread.Message ID: @.***>