Opened 12 years ago
Last modified 5 years ago
#8889 new defect
SVG: styles not fully supported
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | svg svgsalamander style | Cc: |
Description (last modified by )
As mentioned on #8849 some .svg files are not rendered properly:
Replying to AlfonZ:
Replying to skyper:
Replying to brycenesbitt:
With the .png it works fine, and I suggest making the patch that way until svg support
is more widely used in presets.
Strange, I have no problems with .svg (#8596 and #8847). How should they be introduced but with new items ? We need to find the problem otherwise it is not worth to ship the huge libs but you are right that this problem should not make a difference considering this ticket.
It looks that styles in svg are not fully supported.
I tried following:
aed.svg
12 12 </style> 13 13 </defs> 14 14 <g id="Ebene 1"> 15 <rect class="fil0" x="0" y="0" width="600" height="600"/>16 <path class="fil1" d="M0 0l300 0 300 0 0 300 0 300 -300 0 -300 0 0 -600zm259 553c21,-11 49,-30 77,-55 30,-25 53,-49 74,-75 27,-32 46,-65 51,-90 2,-13 2,-36 0,-50 -5,-27 -16,-52 -33,-72 -20,-25 -48,-40 -75,-41 -19,-1 -37,3 -55,12 -15,7 -26,14 -38,26 -4,5 -8,8 -8,8 0,0 -4,-3 -8,-7 -19,-19 -41,-32 -65,-37 -32,-7 -60,0 -86,20 -27,23 -47,60 -52,98 -2,16 -1,35 3,48 9,35 38,79 85,125 38,38 83,73 115,90 4,1 7,3 8,3 0,0 3,-1 7,-3zm253 -393l0 -28 29 -1 30 0 0 -24 0 -24 -29 0c-22,0 -29,-1 -30,-1 0,-1 0,-8 0,-29l0 -29 -27 0 -26 0 0 28c0,25 0,29 -1,30 0,1 -4,1 -30,1l-29 0 0 24 0 24 30 0c26,0 29,0 30,1 0,1 0,8 0,29l0 27 26 0 26 0 1 -28z"/>17 <path class="fil1" d="M201 479c-1,-1 10,-26 24,-57 13,-31 24,-57 24,-58l1 -1 -35 0c-31,-1 -34,-1 -34,-2 0,0 21,-26 56,-68 31,-37 57,-68 58,-69 2,-2 3,-2 3,-1 0,1 -10,25 -22,54 -12,30 -22,54 -22,54 0,1 6,1 33,1 23,0 32,1 32,1 0,1 -116,145 -117,146 -1,0 -1,0 -1,0z"/>15 <rect fill="#FFFFFF" x="0" y="0" width="600" height="600"/> 16 <path fill="#009A3B" d="M0 0l300 0 300 0 0 300 0 300 -300 0 -300 0 0 -600zm259 553c21,-11 49,-30 77,-55 30,-25 53,-49 74,-75 27,-32 46,-65 51,-90 2,-13 2,-36 0,-50 -5,-27 -16,-52 -33,-72 -20,-25 -48,-40 -75,-41 -19,-1 -37,3 -55,12 -15,7 -26,14 -38,26 -4,5 -8,8 -8,8 0,0 -4,-3 -8,-7 -19,-19 -41,-32 -65,-37 -32,-7 -60,0 -86,20 -27,23 -47,60 -52,98 -2,16 -1,35 3,48 9,35 38,79 85,125 38,38 83,73 115,90 4,1 7,3 8,3 0,0 3,-1 7,-3zm253 -393l0 -28 29 -1 30 0 0 -24 0 -24 -29 0c-22,0 -29,-1 -30,-1 0,-1 0,-8 0,-29l0 -29 -27 0 -26 0 0 28c0,25 0,29 -1,30 0,1 -4,1 -30,1l-29 0 0 24 0 24 30 0c26,0 29,0 30,1 0,1 0,8 0,29l0 27 26 0 26 0 1 -28z"/> 17 <path fill="#009A3B" d="M201 479c-1,-1 10,-26 24,-57 13,-31 24,-57 24,-58l1 -1 -35 0c-31,-1 -34,-1 -34,-2 0,0 21,-26 56,-68 31,-37 57,-68 58,-69 2,-2 3,-2 3,-1 0,1 -10,25 -22,54 -12,30 -22,54 -22,54 0,1 6,1 33,1 23,0 32,1 32,1 0,1 -116,145 -117,146 -1,0 -1,0 -1,0z"/> 18 18 </g> 19 19 </svg> and it showed in the menu correctly.
Attachments (3)
Change History (9)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|
comment:2 by , 12 years ago
Description: | modified (diff) |
---|
follow-up: 4 comment:3 by , 12 years ago
comment:4 by , 12 years ago
Replying to brycenesbitt:
On my system aeg.sgv, when used as a preset icon, results in a black square in the menu.
This is the original svg. Please try aed_fixed.svg which I did patch with the patch above.
by , 12 years ago
Attachment: | no_aed.png added |
---|
comment:5 by , 12 years ago
It is a missing feature of the svg library we are using. All the bugs we see in JOSM should be reported upstream. This particular issue will probably not be fixed any time soon:
https://java.net/jira/browse/SVGSALAMANDER-27
comment:6 by , 5 years ago
Keywords: | svgsalamander added |
---|
On my system aeg.sgv, when used as a preset icon, results in a black square in the menu.