Modify

Opened 6 years ago

Last modified 6 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 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 6 years ago.
svg with patch applied
* Java OpenStreetMap Editor_25.png (41.5 KB) - added by brycenesbitt 6 years ago.
aed preset applied
no_aed.png (41.5 KB) - added by brycenesbitt 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by skyper

Description: modified (diff)

comment:2 Changed 6 years ago by skyper

Description: modified (diff)

comment:3 Changed 6 years ago by brycenesbitt

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

Changed 6 years ago by skyper

Attachment: aed_fixed.svg added

svg with patch applied

comment:4 in reply to:  3 Changed 6 years ago by skyper

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 6 years ago by skyper (previous) (diff)

Changed 6 years ago by brycenesbitt

aed preset applied

Changed 6 years ago by brycenesbitt

Attachment: no_aed.png added

comment:5 Changed 6 years ago by bastiK

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

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.