Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 03cb773

Browse files
committed
Add sharper icons using Inkscape for rendering
1 parent 3659cad commit 03cb773

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

bin/create-icons.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,29 @@ if ! command -v magick &> /dev/null; then
55
exit 1
66
fi
77

8+
if ! command -v inkscape &> /dev/null; then
9+
echo "This tool requires Inkscape to be render sharper SVGs than ImageMagick."
10+
exit 1
11+
fi
12+
813
if ! command -v icnsutil &> /dev/null; then
914
echo "This tool requires icnsutil to be installed in order to generate macOS icons."
1015
exit 1
1116
fi
1217

1318
script_dir=$(realpath $(dirname $0))
1419
cd "${script_dir}/../images/app-icons"
15-
magick -background none "../icon-color.svg" -resize 180x180 "./ios/apple-touch-icon.png"
20+
inkscape -w 180 -h 180 "../icon-color.svg" -o "./ios/apple-touch-icon.png"
1621

1722
# Build PNGs
18-
magick -background none "../icon-color.svg" -resize "128x128" "./png/128x128.png"
19-
magick -background none "../icon-color.svg" -resize "256x256" "./png/256x256.png"
20-
magick -background none "../icon-purple.svg" -resize "256x256" "./png/256x256-dev.png"
23+
inkscape -w 128 -h 128 "../icon-color.svg" -o "./png/128x128.png"
24+
inkscape -w 256 -h 256 "../icon-color.svg" -o "./png/256x256.png"
25+
inkscape -w 256 -h 256 "../icon-purple.svg" -o "./png/256x256-dev.png"
2126

2227
# Build Mac .icns
23-
declare -a sizes=("16x16" "32x32" "512x512" "1024x1024")
28+
declare -a sizes=("16" "32" "512" "1024")
2429
for size in "${sizes[@]}"; do
25-
magick -background none "../icon-color.svg" -resize "${size}" "./png/${size}.png"
30+
inkscape -w $size -h $size "../icon-color.svg" -o "./png/${size}x${size}.png"
2631
done
2732
icnsutil compose -f "mac/icon.icns" "./png/16x16.png" "./png/32x32.png" "./png/128x128.png" "./png/512x512.png" "./png/1024x1024.png"
2833

-4.34 KB
Loading

images/app-icons/mac/icon.icns

-143 KB
Binary file not shown.

images/app-icons/png/128x128.png

-2.63 KB
Loading

images/app-icons/png/256x256-dev.png

65 Bytes
Loading

images/app-icons/png/256x256.png

78 Bytes
Loading

0 commit comments

Comments
 (0)