From d740d020b6631fa0d839a5b4bcd3e617847f3902 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 22 Apr 2020 13:30:04 +0200 Subject: [PATCH] [logo] media cards with subtitles for vscode-clangd etc repositories --- logo/.gitignore | 1 + logo/build.sh | 12 ++++++++++-- logo/clangd.svg | 19 ++++++++++++++----- logo/logo.svg | 9 +++++++++ 4 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 logo/.gitignore diff --git a/logo/.gitignore b/logo/.gitignore new file mode 100644 index 0000000..4898d45 --- /dev/null +++ b/logo/.gitignore @@ -0,0 +1 @@ +card-*.png diff --git a/logo/build.sh b/logo/build.sh index 7c8e45c..aa5c444 100755 --- a/logo/build.sh +++ b/logo/build.sh @@ -1,13 +1,21 @@ #!/bin/bash -ex -inkscape clangd.svg --export-png=card.png -h=640 SMALLER="-strip -define png:compression-filter=3" PAD_TO="-background none -gravity center -extent" LOGO_ONLY="--export-id=CD --export-background-opacity=0" CONTRAST="-level 20%,100%,1.4" -inkscape clangd.svg $LOGO_ONLY --export-plain-svg=logo.svg +inkscape clangd.svg $LOGO_ONLY --export-plain-svg=logo.svg +inkscape clangd.svg --export-png=card.png -h=640 mogrify $SMALLER card.png inkscape clangd.svg --export-png=logo.png -h=1024 $LOGO_ONLY mogrify $SMALLER $PAD_TO 1024x1024 logo.png inkscape clangd.svg --export-png=favicon.png -h=16 $LOGO_ONLY --export-area-snap mogrify -define png:exclude-chunk=all $CONTRAST $PAD_TO 16x16 favicon.png + +# Set CARD="vscode coc www" to generate cards with subtitles. +for CARD in $CARDS; do + xmlstarlet < clangd.svg edit -P \ + --update "//*[@id='subtitle']/*[local-name()='tspan']" --value "$CARD" \ + | inkscape - --export-png=card-$CARD.png -h=640 + mogrify $SMALLER card-$CARD.png +done diff --git a/logo/clangd.svg b/logo/clangd.svg index 51e3888..4507d96 100644 --- a/logo/clangd.svg +++ b/logo/clangd.svg @@ -110,15 +110,15 @@ inkscape:pageopacity="1" inkscape:pageshadow="2" inkscape:zoom="1.5270238" - inkscape:cx="316.64656" - inkscape:cy="230.01457" + inkscape:cx="402.76179" + inkscape:cy="151.43033" inkscape:document-units="mm" inkscape:current-layer="layer2" showgrid="true" showguides="true" - inkscape:window-width="1724" + inkscape:window-width="1916" inkscape:window-height="1041" - inkscape:window-x="192" + inkscape:window-x="0" inkscape:window-y="18" inkscape:window-maximized="0" fit-margin-top="10" @@ -135,7 +135,7 @@ image/svg+xml - + @@ -177,5 +177,14 @@ sodipodi:nodetypes="sssccccsccss" inkscape:label="D" /> + diff --git a/logo/logo.svg b/logo/logo.svg index 613480f..f564ccb 100644 --- a/logo/logo.svg +++ b/logo/logo.svg @@ -125,5 +125,14 @@ style="fill:url(#linearGradient6316);fill-opacity:1;stroke:#0d386b;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="D" /> +