]> git.ipfire.org Git - artwork.git/commitdiff
Generate monochrome/inverted versions of the logo
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Apr 2025 14:45:58 +0000 (15:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Apr 2025 14:45:58 +0000 (15:45 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
.gitignore
Makefile

index 8636d971b2909b1ab1a6e98ad09f90e7d71e1ac1..33c760643fa7270a1bbad0874217fd462cc84d63 100644 (file)
@@ -1,4 +1,12 @@
 .DS_Store
+inverted/*.pdf
+inverted/*.png
+inverted/*.svg
+monochrome/*.pdf
+monochrome/*.png
+monochrome/*.svg
 standard/*.pdf
 standard/*.png
 standard/*.svg
+/logo-inverted.svg
+/logo-monochrome.svg
index 150929f6ff57aee0e3f2841c67b5876bc6bd3323..a3d8779418da9cffa8f083b3814c9030649dab2b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,19 @@ OBJECTS = \
        standard/logo.pdf \
        standard/logo-512x512.png \
        standard/logo-1024x1024.png \
-       standard/logo-2048x2048.png
+       standard/logo-2048x2048.png \
+       \
+       monochrome/logo.svg \
+       monochrome/logo.pdf \
+       monochrome/logo-512x512.png \
+       monochrome/logo-1024x1024.png \
+       monochrome/logo-2048x2048.png \
+       \
+       inverted/logo.svg \
+       inverted/logo.pdf \
+       inverted/logo-512x512.png \
+       inverted/logo-1024x1024.png \
+       inverted/logo-2048x2048.png
 
 # Inkscape command line
 INKSCAPE = inkscape $< --export-filename=$@
@@ -36,7 +48,66 @@ standard/logo-2048x2048.png: logo.svg
        mkdir -p $(dir $@)
        $(INKSCAPE) --export-width=2048
 
+# Convert the logo to monochome only
+logo-monochrome.svg: logo.svg
+       sed "s/fill:[^;\"]*/fill:#000000/g; s/stroke:[^;\"]*/stroke:none/g" < $< > $@
+
+# Converts the logo to a plain SVG file without requiring the font
+monochrome/logo.svg: logo-monochrome.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) \
+               --batch-process \
+               --actions="select-all;object-to-path;export-plain-svg"
+
+# Converts the logo to PDF
+monochrome/logo.pdf: logo-monochrome.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE)
+
+# Converts the logo to a transparent PNG image with 512x512 pixels
+monochrome/logo-512x512.png: logo-monochrome.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) --export-width=512
+
+monochrome/logo-1024x1024.png: logo-monochrome.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) --export-width=1024
+
+monochrome/logo-2048x2048.png: logo-monochrome.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) --export-width=1024
+
+# Convert the logo to use white only
+logo-inverted.svg: logo.svg
+       sed "s/fill:[^;\"]*/fill:#ffffff/g; s/stroke:[^;\"]*/stroke:none/g" < $< > $@
+
+# Converts the logo to a plain SVG file without requiring the font
+inverted/logo.svg: logo-inverted.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) \
+               --batch-process \
+               --actions="select-all;object-to-path;export-plain-svg"
+
+# Converts the logo to PDF
+inverted/logo.pdf: logo-inverted.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE)
+
+# Converts the logo to a transparent PNG image with 512x512 pixels
+inverted/logo-512x512.png: logo-inverted.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) --export-width=512
+
+inverted/logo-1024x1024.png: logo-inverted.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) --export-width=1024
+
+inverted/logo-2048x2048.png: logo-inverted.svg
+       mkdir -p $(dir $@)
+       $(INKSCAPE) --export-width=1024
+       
 .PHONY: clean
 clean:
        # Remove all generated objects
        rm -vf $(OBJECTS)
+       rm -vf logo-inverted.svg logo-monochrome.svg