Ticket #288 (closed enhancement/feature request: fixed)
Support use of rsvg-convert to create pre-scaled icons
| Reported by: | Gerritv | Owned by: | KaZeR |
|---|---|---|---|
| Priority: | major | Milestone: | version 0.2.0 |
| Component: | tools | Version: | svn |
| Keywords: | Cc: |
Description
On many development platforms (Ubuntu, Scratchbox, etc) ksvg2png does not exist. To add it requires installing KDE which is generally a 130mb exercise. A simpler solution is to use rsvg-convert, which installs from librsvg2. Patching navit/xpm/navit_svg2png with the below switches it to use rsvg-convert.
Index: navit_svg2png =================================================================== --- navit_svg2png (revision 2001) +++ navit_svg2png (working copy) @@ -29,11 +29,14 @@
then
h=$(grep 'height="[0-9pxt.]*"' $svg.svg | head -n 1 | sed -e 's/.*height="//' -e 's/[pxt]*".*//')
fi
- ksvgtopng $w $h $svg.svg $png + rsvg-convert -w $w -h $h $svg.svg -o $png
elif [ -f $svg.svgz ] then
gzip -dc <$svg.svgz >$svg.svg
- ksvgtopng $w $h $svg.svg $png + rsvg-convert -w $w -h $h $svg.svg -o $png
rm -f $svg.svg
fi
fi
