Changes between Version 24 and Version 25 of DevelopersGuide/DefaultPresets


Ignore:
Timestamp:
2016-08-13T13:56:41+02:00 (9 years ago)
Author:
Klumbumbus
Comment:

rework icon section

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/DefaultPresets

    v24 v25  
    2020== New Icons
    2121* The preferred file format is '''svg''' (for lossless scaling). If this is not possible then png.
    22 * Check if the svg file correctly works with JOSM. 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.
    23 * 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])
    24 * 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
    25 * Due to a bug in svgcleaner however, you need to check that the svg code doesn't contain arguments starting with special characters in style codes e.g. `-inkscape-font-specification:Sans;`. This can lead to color changes (see #13158).
    26 * The icon should be identifiable at a size of '''16 pixels'''. This is the default size the icons are displayed in the [[Help/MapView|Map View]].
     22* The icon must be identifiable at a size of '''16 pixels'''. This is the default size the icons are displayed in the [[Help/MapView|Map View]].
    2723* The '''license''' needs to be compatible with GPL3 (like PD or CC0). A good source for Icons is [http://openclipart.org openclipart.org] (all icons there are PD). You can also check if JOSM already has a fitting unused icon in one of its icon folders: [browser:josm/trunk/images used icons] and [browser:josm/trunk/images_nodist unused icons].
    2824* 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".)
     
    3026* The icon should hide as less as possible in the mapview, so colourful icons with transparent background are preferred over black/white icons with square background.
    3127* The icon should be understandable in all countries.
     28* Possible problems with svg in JOSM (Please check if the svg file correctly works within JOSM.)
     29 * The base size of svg should be 16px or larger than 64px. Images with a base size between 16 and 64 px will not be scaled down to 16px.
     30 * 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.
     31 * 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])
     32 * 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.
     33 * 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).
     34
    3235
    3336== See also