Extraneous white space in Staff Text after modifying MSCX
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
FWIW, I get this in MU4.1:
The B can be dragged.
In reply to FWIW, I get this in MU4.1: … by bobjp
Yes, but I'm trying to batch-convert clef, so having to manually fix each file would kill the point. Does the Staff Text contain empty space and/or line breaks ? Thanks.
In reply to Yes, but I'm trying to… by BanjoJake
Yes it can
For what it's worth, 3.6.2 gives this result:
But 4.1 looks like it lacks any linebreaks/spaces
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:
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:
In reply to P.S. "The XML shows no… 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.