Extraneous white space in Staff Text after modifying MSCX

• Jul 22, 2023 - 18:29

Opening the attached file in v3.7 adds whitespace ahead of and after the Staff Text "B". It was modified by code I wrote, then opened and saved again in v3.7.

Thanks !
(Edit: I Changed the Title (again) to reflect the resolution. I replaced the original MSCX example with a simpler one, I added more explanation)

Again, this post can be deleted.

Attachment Size
Staff Text Spacing Bug (6).mscx 41.66 KB

Comments

P.S. "The XML shows no spaces" is false. There are existing spacings. Apparently there's supposed to be a tight-nitness for the tag. Look at the resulting XML when text font formating is performed from within MuseScore:

textTag.png

Your XML file has line breaks and tab/spacing which it shouldn't have, apparently. No point in filing an issue since 3.6.2 is closed for updates (unless JoJo wants to do something ;). As to how that happens, one viable guess would be that there were manual alterations to the XML outside of MuseScore's application, or maybe an external plugin performed some "magic"...

In other words, the following image of your XML file in grey-space is deemed as actual spacing in your XML file and apparently MuseScore 3.6/7 interprets it as actual text data:
2.png

In reply to by worldwideweary

Yes, thanks, I guess I'm too used to looking at XML without seeing the whitespace ! So the problem was that C# DOM by default indents and adds line breaks (for 'readability', I guess). There is an option PreserveWhitespace which needed to be set. Many Thanks again ! - Jake

@ADMIN - this post can be deleted. It is not a Musescore bug, as explained by worldwideweary. Thanks, and sorry for the bother.

Do you still have an unanswered question? Please log in first to post your question.