Skip to content

Commit

Permalink
Fix black backgrounds in exported svgs
Browse files Browse the repository at this point in the history
It seems Inkscape no longer works with both background color and opacity
0: the color overrides. I don't know if it's a bug, but making opacity 0
seems to do the right thing.
  • Loading branch information
taniwha committed Dec 15, 2020
1 parent 8a079df commit 32dcab3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ nightheron.png: nightheron.svg
inkscape --export-width=256 --export-height=160 --export-type=png -o $@ $^

kairyuu_scaled.png: kairyuu.svg
inkscape --export-width=64 --export-height=40 --export-background='#000000' --export-background-opacity=0 --export-type=png -o $@ $^
inkscape --export-width=64 --export-height=40 --export-type=png -o $@ $^

icon_button.png: icon_button.svg
inkscape --export-width=24 --export-height=24 --export-background='#000000' --export-background-opacity=0 --export-type=png -o $@ $^
inkscape --export-width=24 --export-height=24 --export-background-opacity=0 --export-type=png -o $@ $^

icon_filter_n.png: icon_button.svg
sed -e 's/\#....../#000000/g' $^ | inkscape --export-width=32 --export-height=32 --export-background='#000000' --export-background-opacity=0 --export-type=png -o $@ /dev/stdin
sed -e 's/\#....../#000000/g' $^ | inkscape --export-width=32 --export-height=32 --export-background-opacity=0 --export-type=png -o $@ /dev/stdin

icon_filter_s.png: icon_button.svg
sed -e 's/\#....../#ffffff/g' $^ | inkscape --export-width=32 --export-height=32 --export-background='#000000' --export-background-opacity=0 --export-type=png -o $@ /dev/stdin
sed -e 's/\#....../#ffffff/g' $^ | inkscape --export-width=32 --export-height=32 --export-background-opacity=0 --export-type=png -o $@ /dev/stdin

clean:
rm -f kairyuu.png kairyuu_scaled.png icon_button.png icon_filter*.png ${GUI_ICONS}
Expand Down

0 comments on commit 32dcab3

Please sign in to comment.