diff --git a/make-includes/standard_rules.make b/make-includes/standard_rules.make index cb3e5be..c1db1fc 100644 --- a/make-includes/standard_rules.make +++ b/make-includes/standard_rules.make @@ -221,29 +221,29 @@ $(EPSTOPDF) --outfile=$(IMGDIR)/$@ $< # $(PS2EPS) --ignoreBB --nohires --loose < $< | $(PS2PDF) -dEPSCrop - $(IMGDIR)/$@ # -# PDF from SVG (via librsvg) +# PDF from SVG (via Inkscape) # The --export-area-drawing option now appears to behave correctly with # PDFs (previously it over-cropped slightly). # %.pdf %-print.pdf: %.svg - $(RSVG_CONVERT) --format pdf $< | $(PDFCROP) - $(IMGDIR)/$@ + $(INKSCAPE) --file=$< --without-gui --export-area-drawing --export-text-to-path --export-pdf=$(IMGDIR)/$@ # -# PNG from SVG (via librsvg) +# PNG from SVG (via Inkscape) # %.png %-print.png %-web.png: %.svg - $(RSVG_CONVERT) --format png --background-color white --zoom 4 $< | convert -trim -scale 30% -density 96 - $(IMGDIR)/$@ + $(INKSCAPE) --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=96 --export-png=$(IMGDIR)/$@ %-web-zoom.png: %.svg - $(RSVG_CONVERT) --format png --background-color white --zoom 4 $< | convert -trim -scale 45% -density 144 - $(IMGDIR)/$@ + $(INKSCAPE) --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=144 --export-png=$(IMGDIR)/$@ %-print-zoom.png: %.svg - $(RSVG_CONVERT) --format png --background-color white --zoom 4 $< | convert -trim -density 300 - $(IMGDIR)/$@ + $(INKSCAPE) --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=300 --export-png=$(IMGDIR)/$@ %-print-zoom-transparent.png: %.svg - $(RSVG_CONVERT) --format png --zoom 4 $< | convert -trim -density 300 - $(IMGDIR)/$@ + $(INKSCAPE) --file=$< --without-gui --export-area-drawing --export-background-opacity=0 --export-dpi=300 --export-png=$(IMGDIR)/$@ %-transparent.png: %.svg - $(RSVG_CONVERT) --format png --zoom 4 $< | convert -trim -scale 30% -density 96 - $(IMGDIR)/$@ + $(INKSCAPE) --file=$< --without-gui --export-area-drawing --export-background-opacity=0 --export-dpi=96 --export-png=$(IMGDIR)/$@ # # PNG from PNG (change the name). # These appear to need to be separate rules. If both variants need to be @@ -284,7 +284,8 @@ # # PDF from PlantUML # Direct PDF from PlantUML is problematic, go via SVG instead. -# Note PlantUML generated diagrams are already minimal dimensions, so no need to crop. # %.pdf: %.pu - $(PLANTUML) -tsvg -pipe < $< | $(RSVG_CONVERT) --format pdf | $(PDFCROP) - $(IMGDIR)/$@ + $(PLANTUML) -tsvg -pipe < $< > $(IMGDIR)/$*_tmp.svg + $(INKSCAPE) --file=$(IMGDIR)/$*_tmp.svg --without-gui --export-area-drawing --export-text-to-path --export-pdf=$(IMGDIR)/$@ + @$(RM) -f $(IMGDIR)/$*_tmp.svg