View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015454 | Scribus | Graphics / Image Frames | public | 2018-10-11 03:51 | 2019-06-04 20:55 |
Reporter | jack_cat | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
OS | Windows | OS Version | 7 | ||
Product Version | 1.4.6 | ||||
Fixed in Version | 1.4.8.svn | ||||
Summary | 0015454: Importing a Lilypond-generated .svg file generates peculiar results | ||||
Description | I am doing fine using lilypond-generated .png files instead, but mentioning this problem on the Scribus forum led to A.L.E. suggesting that I upload a lilypond-generated .svg file here, so that it may be determined whether the issue is with Lilypond or with Scribus. | ||||
Steps To Reproduce | Import the .svg file into Scribus using the command in the file menu | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
struct-duo-test_01.svg (7,932 bytes)
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="210.00mm" height="297.00mm" viewBox="0 0 119.5016 169.0094"> <!-- Page: 1/1 --> <text transform="translate(5.6906, 2.8453)" font-family="Century Schoolbook L" font-size="2.2001" text-anchor="start" fill="currentColor"> <tspan> </tspan> </text> <line transform="translate(14.2264, 9.6213)" stroke-linejoin="round" stroke-linecap="round" stroke-width="0.1000" stroke="currentColor" x1="0.0500" y1="0.0000" x2="38.3955" y2="0.0000"/> <line transform="translate(14.2264, 8.6213)" stroke-linejoin="round" stroke-linecap="round" stroke-width="0.1000" stroke="currentColor" x1="0.0500" y1="0.0000" x2="38.3955" y2="0.0000"/> <line transform="translate(14.2264, 7.6213)" stroke-linejoin="round" stroke-linecap="round" stroke-width="0.1000" stroke="currentColor" x1="0.0500" y1="0.0000" x2="38.3955" y2="0.0000"/> <line transform="translate(14.2264, 6.6213)" stroke-linejoin="round" stroke-linecap="round" stroke-width="0.1000" stroke="currentColor" x1="0.0500" y1="0.0000" x2="38.3955" y2="0.0000"/> <line transform="translate(14.2264, 5.6213)" stroke-linejoin="round" stroke-linecap="round" stroke-width="0.1000" stroke="currentColor" x1="0.0500" y1="0.0000" x2="38.3955" y2="0.0000"/> <rect transform="translate(35.1841, 7.6213)" x="0.0000" y="-2.0000" width="0.1900" height="4.0000" ry="0.0000" fill="currentColor"/> <rect transform="translate(48.5676, 7.6213)" x="0.0000" y="-2.0000" width="0.1900" height="4.0000" ry="0.0000" fill="currentColor"/> <rect transform="translate(43.5538, 7.6213)" x="-0.0650" y="-2.0000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:12:13"> <path transform="translate(42.3026, 9.1213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(40.5395, 7.6213)" x="-0.0650" y="-2.5000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:10:11"> <path transform="translate(39.2884, 8.6213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(37.5253, 7.6213)" x="-0.0650" y="-3.0000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <rect transform="translate(50.9088, 7.6213)" x="-0.0650" y="-1.0000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:16:17"> <path transform="translate(49.6576, 10.1213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(46.5680, 7.6213)" x="-0.0650" y="-1.5000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:14:15"> <path transform="translate(45.3168, 9.6213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(27.1918, 7.6213)" x="-0.0650" y="-1.5000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:2:3"> <path transform="translate(25.9406, 9.6213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(24.1775, 7.6213)" x="-0.0650" y="-1.0000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <path transform="translate(19.2264, 7.6213) scale(0.0040, -0.0040)" d="M359 27c-49 0 -75 42 -75 75c0 38 27 77 72 77c4 0 9 0 14 -1c-28 37 -72 59 -120 59c-106 0 -113 -73 -113 -186v-51v-51c0 -113 7 -187 113 -187c80 0 139 70 158 151c2 7 7 10 12 10c6 0 13 -4 13 -12c0 -94 -105 -174 -183 -174c-68 0 -137 21 -184 70 c-49 51 -66 122 -66 193s17 142 66 193c47 49 116 69 184 69c87 0 160 -64 175 -150c1 -5 1 -9 1 -13c0 -40 -30 -72 -67 -72z" fill="currentColor"/> <path transform="translate(15.0264, 8.6213) scale(0.0040, -0.0040)" d="M376 262c4 0 9 1 13 1c155 0 256 -128 256 -261c0 -76 -33 -154 -107 -210c-22 -17 -47 -28 -73 -36c3 -35 5 -70 5 -105c0 -19 -1 -39 -2 -58c-7 -120 -90 -228 -208 -228c-108 0 -195 88 -195 197c0 58 53 103 112 103c54 0 95 -47 95 -103c0 -52 -43 -95 -95 -95 c-11 0 -21 2 -31 6c26 -39 68 -65 117 -65c96 0 157 92 163 191c1 18 2 37 2 55c0 31 -1 61 -4 92c-29 -5 -58 -8 -89 -8c-188 0 -333 172 -333 374c0 177 131 306 248 441c-19 62 -37 125 -45 190c-6 52 -7 104 -7 156c0 115 55 224 149 292c3 2 7 3 10 3c4 0 7 0 10 -3 c71 -84 133 -245 133 -358c0 -143 -86 -255 -180 -364c21 -68 39 -138 56 -207zM461 -203c68 24 113 95 113 164c0 90 -66 179 -173 190c24 -116 46 -231 60 -354zM74 28c0 -135 129 -247 264 -247c28 0 55 2 82 6c-14 127 -37 245 -63 364c-79 -8 -124 -61 -124 -119 c0 -44 25 -91 81 -123c5 -5 7 -10 7 -15c0 -11 -10 -22 -22 -22c-3 0 -6 1 -9 2c-80 43 -117 115 -117 185c0 88 58 174 160 197c-14 58 -29 117 -46 175c-107 -121 -213 -243 -213 -403zM408 1045c-99 -48 -162 -149 -162 -259c0 -74 18 -133 36 -194 c80 97 146 198 146 324c0 55 -4 79 -20 129z" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:0:1"> <path transform="translate(22.9264, 10.1213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:8:9"> <path transform="translate(36.2741, 8.1213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(33.2202, 7.6213)" x="-0.0650" y="-2.5000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:6:7"> <path transform="translate(31.9690, 8.6213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <rect transform="translate(30.2060, 7.6213)" x="-0.0650" y="-2.0000" width="0.1300" height="3.3122" ry="0.0400" fill="currentColor"/> <a style="color:inherit;" xlink:href="textedit://C:/Jack/Jack_Books/Lilypond_Test/struct-duo-test_01.ly:7:4:5"> <path transform="translate(28.9548, 9.1213) scale(0.0040, -0.0040)" d="M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z" fill="currentColor"/> </a> <a transform="translate(31.4631, 165.1512)" xlink:href="http://lilypond.org/"> <rect x="0.0000" y="-0.4439" width="56.5755" height="2.0827" fill="none" stroke="none" stroke-width="0.0"/> </a> <text transform="translate(31.4631, 165.1512)" font-family="Century Schoolbook L" font-size="2.2001" text-anchor="start" fill="currentColor"> <tspan> Music engraving by LilyPond 2.18.2—www.lilypond.org</tspan> </text> </svg> |
|
this is how inkscape shows the file... and i can confirm that the rendering is "messed up" in scribus 1.5... |
|
|
|
the problem is color related. when you ungroup the imported file, you can select all and apply a fill color and for the horizontal lines a stroke color. there is an empty rectangle behind the text line. this doesn't need any color (or could be deleted…) after that, the file looks correct. checked with scribus 1.4.7 and 1.5.4 – the same. (except that you can't apply a color to a selection of multiple objects in scribus 1.4.x…) in the xml code all the colors are set as 'currentColor'. when i change this to 'black' in a text editor, the file imports correct. i don't know much about xml, but it might be a 'lilypond' issue. |
|
This lillypond svg apparently relies on undefined behavior. SVG 1.1. specs tells us about currentColor property: "Indicates that painting is done using the color specified by the 'color' property. However both SVG 1.1 and CSS 2 specs tells us the the default value of 'color' is 'user agent defined', ie implementation defined. So the result of using 'currentColor' before specifying explicitly a value for 'color' will be implementation defined. Given that this svg from lillypond does not specify a 'color' value before using 'currentColor', I have to consider that lillypond is relying on undefined behavior and hence this is up to Lillypond to stop relying on such undefined behavior. |
|
the question is: where does the file come from? at least on macOS i can't generate .svg files direct from lilypond! …could be a 'self made' issue while converting somehow… an imported .pdf file from lilypond looks perfect in scribus 1.5.4. |
|
according to this forum post http://forums.scribus.net/index.php/topic,3042.msg14421.html#msg14421 lillypond can export to svg... |
|
I modified the default "currentColor" to black so that it matches what browsers do. I just hope lilypond devs will fix the undefined behavior in their svg output too. |
|
I believe the current lilypond behavior is correct. The color choice for the rendering is to be made by the render engine, rather than the content creator. This allows CSS to specify the color of the elements, thus allowing easy recoloring of the graphic without having to regenerate it. There is currently some discussion going on to improve the svg output of lilypond. One idea is that a command line option could be given to force the lilypond output svg to be whatever color the user desired. Even if this option is added to lilypond, I believe that Scribus (as a renderer of the SVG image) has the responsibility to create an appropriate default for currentColor. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-10-11 03:51 | jack_cat | New Issue | |
2018-10-11 03:51 | jack_cat | File Added: struct-duo-test_01.svg | |
2018-10-11 06:17 | ale | File Added: lilly.png | |
2018-10-11 06:17 | ale | Note Added: 0045506 | |
2018-10-11 06:19 | ale | File Deleted: lilly.png | |
2018-10-11 06:20 | ale | File Added: lilly.png | |
2018-10-11 07:18 | utnik | Note Added: 0045507 | |
2018-10-11 10:57 | jghali | Note Added: 0045508 | |
2018-10-11 12:10 | utnik | Note Added: 0045509 | |
2018-10-11 12:43 | ale | Note Added: 0045512 | |
2018-10-14 21:13 | jghali | Summary | Importing a Lilypond-generated .svg file to Scribus generates peculiar results => Importing a Lilypond-generated .svg file generates peculiar results |
2018-10-14 21:15 | jghali | Assigned To | => jghali |
2018-10-14 21:15 | jghali | Status | new => resolved |
2018-10-14 21:15 | jghali | Resolution | open => fixed |
2018-10-14 21:15 | jghali | Fixed in Version | => 1.4.8.svn |
2018-10-14 21:15 | jghali | Note Added: 0045514 | |
2018-12-04 22:33 | cds4byu | Note Added: 0045680 | |
2019-06-04 20:55 | cbradney | Status | resolved => closed |