Opened 44 hours ago
Last modified 34 hours ago
#24793 reopened enhancement
Boundaries of SVG support - Consider switching from svgsalamander to JSVG
| Reported by: | Kilkenni | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 26.07 |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description (last modified by )
While working on some icons, I've found that certain SVG features do not display properly in JOSM. Specifically, the paint-order directive described in MDN https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/paint-order is ignored.
Afaik, it is a part of the SVG2 standard, but it's quite established at this point and has been supported by modern browsers for 5+ years. Is this a problem with the SVG engine in JOSM?
If it is, it would be useful to mention this in JOSM wiki (for example, here https://josm.openstreetmap.de/wiki/Styles#Icons), pointing out that SVG2 icons are not supported.
Attachments (2)
Change History (7)
by , 43 hours ago
| Attachment: | 2026-07-07_14-52-09.png added |
|---|
comment:1 by , 43 hours ago
| Description: | modified (diff) |
|---|
follow-up: 3 comment:2 by , 36 hours ago
| Resolution: | → othersoftware |
|---|---|
| Status: | new → closed |
JOSM uses SVG-Salamander for SVG support as long as Java does not support SVG directly. See https://github.com/blackears/svgSalamander for the upstream project.
comment:3 by , 35 hours ago
Replying to stoecker:
JOSM uses SVG-Salamander for SVG support as long as Java does not support SVG directly. See https://github.com/blackears/svgSalamander for the upstream project.
So I take it, the answer is 'yes'. Salamander repo suggests that it has been in maintenance mode for years, and new features (like SVG 2 support) are unlikely.
comment:4 by , 35 hours ago
| Resolution: | othersoftware |
|---|---|
| Status: | closed → reopened |
| Summary: | Boundaries of SVG support → Boundaries of SVG support - Consider switching from svgsalamander to JSVG |
Probably a switch to https://github.com/weisJ/jsvg would be an option. A few places in ImageProvider and one function in ImageResource would need to be adapted. Seems pretty straightforward.
Patches welcome.
comment:5 by , 34 hours ago
| Milestone: | → 26.07 |
|---|
Hmm, can anyone test? Seems to work as far as I can see.
A bunch of new warnings for some SVGs (LoaderContext needs to be extended with file name information for log).



Example of an icon using paint-order directive in its SVG. Other icons nearby do not use paint-order.