Modify

Opened 11 years ago

Last modified 4 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 skyper)

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

     
    1212  </style>
    1313 </defs>
    1414 <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"/>
    1818 </g>
    1919</svg>

and it showed in the menu correctly.

File with problems: aed.svg

Attachments (3)

aed_fixed.svg (1.6 KB ) - added by skyper 11 years ago.
svg with patch applied
* Java OpenStreetMap Editor_25.png (41.5 KB ) - added by brycenesbitt 11 years ago.
aed preset applied
no_aed.png (41.5 KB ) - added by brycenesbitt 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by skyper, 11 years ago

Description: modified (diff)

comment:2 by skyper, 11 years ago

Description: modified (diff)

comment:3 by brycenesbitt, 11 years ago

On my system aeg.sgv, when used as a preset icon, results in a black square in the menu.

by skyper, 11 years ago

Attachment: aed_fixed.svg added

svg with patch applied

in reply to:  3 comment:4 by skyper, 11 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.

Last edited 11 years ago by skyper (previous) (diff)

by brycenesbitt, 11 years ago

aed preset applied

by brycenesbitt, 11 years ago

Attachment: no_aed.png added

comment:5 by bastiK, 11 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 skyper, 4 years ago

Keywords: svgsalamander added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to skyper.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.