Changes between Version 64 and Version 65 of DevelopersGuide/DefaultPresets
- Timestamp:
- 2025-01-13T23:19:51+01:00 (2 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/DefaultPresets
v64 v65 28 28 * The file format must be **svg** for lossless scaling. (Technically png is supported too but all preset icons are svg since August 2016.) 29 29 * The icon must be **identifiable at a size of 16 pixels**. This is the default size the icons are displayed in the [wikitr:/Help/MapView Map View] on standard dpi (not hidpi) screens. 30 * The **license** needs to be compatible with GPL3 (like PD or CC0). A good source for Icons is [https://openclipart.org openclipart.org] (all icons there are PD), [https://publicdomainvectors.org/ publicdomainvectors.org] (all icons CC0), [https://freesvg.org/ freesvg.org] (all icons CC0) or [http://osm-icons.org/wiki/Icons osm-icons.org] (a lot are CC0). You can also check if JOSM already has a fitting unused icon in one of its icon folders: [ browser:josm/trunk/resources/images used icons] and [browser:josm/trunk/nodist/images unused icons].30 * The **license** needs to be compatible with GPL3 (like PD or CC0). A good source for Icons is [https://openclipart.org openclipart.org] (all icons there are PD), [https://publicdomainvectors.org/ publicdomainvectors.org] (all icons CC0), [https://freesvg.org/ freesvg.org] (all icons CC0) or [http://osm-icons.org/wiki/Icons osm-icons.org] (a lot are CC0). You can also check if JOSM already has a fitting unused icon in one of its icon folders: [source:josm/trunk/resources/images used icons] and [source:josm/trunk/nodist/images unused icons]. 31 31 * If the tag applies to nodes, the icon in the MapView and the icon of the preset should be the same if possible. (It is not possible when different features use the same preset, e.g. `crossing=island` and `crossing=traffic_signals` have different icons, but are handled in only one preset "Pedestrian Crossing".) 32 32 * Icons with transparent background must **not be only black or only white**. Otherwise if one uses a black or white background (no aerial imagery as background) in the Map View black or white icons would be invisible. Workaround: if you want to use a black icon add a square white background to the icon instead of a transparent background or better use a white halo. \\ … … 43 43 * There are some svg libraries which do not work with JOSM (the images get deformed). If you have such a file try the following workaround: create a new svg document with Inkscape, copy the svg data to this new file, resize the page to the data and save. 44 44 * Resize your icon to 16px or an integer multiple size of it (not something like 458.1534) to avoid display inaccuracies due to rounding errors within java. 45 * Check the code of the file in a text editor. Search for **viewBox** value in the beginning of the file. If the icon is, for example, in 16x16 pixels, and if you made it in Inkscape (at least this happens in 0.91 version) and have defined in Document Properties 16,00000 by 16,00000 pixels, probably in the file code you have these values **viewBox="0 0 16.000002 16.000001"**. Change it to **viewBox="0 0 16 16"** or you will have problems (see #12201 and the fix [o31865])45 * Check the code of the file in a text editor. Search for **viewBox** value in the beginning of the file. If the icon is, for example, in 16x16 pixels, and if you made it in Inkscape (at least this happens in 0.91 version) and have defined in Document Properties 16,00000 by 16,00000 pixels, probably in the file code you have these values **viewBox="0 0 16.000002 16.000001"**. Change it to **viewBox="0 0 16 16"** or you will have problems (see #12201) 46 46 * svg icons are automatically cleaned up to reduce file size in the JOSM build. So there is no need to do this step manually before uploading svg files to svn. See comment:35:ticket:10479, comment:10:ticket:10877 and ticket:12201#comment:21 Uncleaned svgs are better for further editing. 47 47 * Due to a bug in svgcleaner however, the svg code shouldn't contain arguments starting with special characters in style codes e.g. `-inkscape-font-specification:Sans;`. This can lead to color changes (see #13158).