diff --git a/make-includes/standard_rules.make b/make-includes/standard_rules.make index 1ed2bc0..b9fdb3f 100755 --- a/make-includes/standard_rules.make +++ b/make-includes/standard_rules.make @@ -97,6 +97,25 @@ -rm -f $(IMGDIR)/$*-tmp.pdf # # PNG from SVG (via Inkscape) +# This is weird: --export-pdf writes the output image exactly where you tell +# it, whereas --export-png seems to write it relative to the original image?? +# So if the original is in images/foo.svg, then --export-pdf=images/foo.pdf +# will create images/foo.pdf, but --export-png=images/foo.png looks like it's +# trying to create images/images/foo.png. --export-png=foo.png will create +# images/foo.png. +# +# ?!?!?! Argh. Bug report submitted to Inkscape. # %.png %-print.png %-web.png: %.svg - inkscape --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=96 --export-png=$(IMGDIR)/$@ + inkscape --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=96 --export-png=$@ + +%-web-zoom.png: %.svg + inkscape --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=144 --export-png=$@ +# +# PNG from PNG (change the name) +# +%-web.png: %.png + cp $< $(IMGDIR)/$@ + +%-print.png: %.png + cp $< $(IMGDIR)/$@