summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrender-symbolic.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/render-symbolic.rb b/render-symbolic.rb
index 8b19efe34..f197fbe36 100755
--- a/render-symbolic.rb
+++ b/render-symbolic.rb
@@ -15,13 +15,9 @@ def chopSVG(icon)
unless (File.exists?(icon[:file]) && !icon[:forcerender])
FileUtils.cp(SRC,icon[:file])
puts " >> #{icon[:name]}"
- cmd = "#{INKSCAPE} -f #{icon[:file]} --select #{icon[:id]} --verb=FitCanvasToSelection --verb=EditInvertInAllLayers "
- cmd += "--verb=EditDelete --verb=EditSelectAll --verb=SelectionUnGroup --verb=SelectionUnGroup --verb=SelectionUnGroup --verb=StrokeToPath --verb=FileVacuum "
- cmd += "--verb=FileSave --verb=FileClose > /dev/null 2>&1"
+ cmd = "#{INKSCAPE} -f #{icon[:file]} -l #{icon[:file]} -i #{icon[:id]} -j"
system(cmd)
- #saving as plain SVG gets rid of the classes :/
- #cmd = "#{INKSCAPE} -f #{icon[:file]} -z --vacuum-defs -l #{icon[:file]} > /dev/null 2>&1"
- #system(cmd)
+ #now get rid of some stuff form the SVG and tweak sizing
svgcrop = Document.new(File.new(icon[:file], 'r'))
svgcrop.root.each_element("//rect") do |rect|
w = ((rect.attributes["width"].to_f * 10).round / 10.0).to_i #get rid of 16 vs 15.99999