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
11.79k stars 2.56k forks source link

SVG generation bug for OttavaSegment #23306

Open eiffel31 opened 1 week ago

eiffel31 commented 1 week ago

Issue type

Import/export issue

Bug description

When ottava alta or bass are used, the generated SVG file is not usable with common tools such as inkscape or openoffice.

Steps to reproduce

Create new score, add few notes with ottava, export as SVG. Open the SVG file with inkscape: big display problems, zoom dependant If the SVG is imported in openoffice document, the vertical part of the ottava delimiter is not displayed.

In the generated SVG file, there are 2 polylines for the ottava segments. The vertical one defines a "stroke-dasharray" with a negative value. Removing the minus sign solves the display problem.

Screenshots/Screen recordings

MuseScore display: image

Inkscape opening the SVG file: image with different zoom: image image

Inkscape view with the minus sign removed: image

MuseScore Version

4.3.2

Regression

I don't know

Operating system

Debian 12.5

Additional context

No response

eiffel31 commented 1 week ago

I just edited a new .svg file, here is the changes I made with a text editor in the produced svg file: <polyline class="OttavaSegment" fill="none" stroke="#33d17a" stroke-dasharray="16.501,-6.62542" stroke-dashoffset="0" stroke-width=... Turned into: <polyline class="OttavaSegment" fill="none" stroke="#33d17a" stroke-dasharray="16.501,6.62542" stroke-dashoffset="0" stroke-width=... (minus sign removal in stroke-dasharray definition)

Jojo-Schmitz commented 1 week ago

Seems to be a Mu3 regression

eiffel31 commented 1 week ago

I just observed the same problem with a "dim. _" <polyline class="HairpinSegment" fill="none" stroke="#000000" stroke-dasharray="17.856,-13.599" stroke-dashoffset="0"... The minus sign has to be removed in the stroke-dasharray definition.

Jojo-Schmitz commented 1 week ago

I suspect it'll be an issue what all dashed lines