mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 14:22:37 +03:00
3c3ba6a30a
Converts the svg font to a path so that rendering doesn't require the full Operator Mono font locally. Adjust the update script to add 10% padding around the icon on macOS as @erf suggests that the increased padding looks better/more consistent with other macOS apps.
28 lines
883 B
Bash
Executable File
28 lines
883 B
Bash
Executable File
#!/bin/bash
|
|
# This script updates the icon files from the svg file.
|
|
# It assumes that the svg file is square.
|
|
set -x
|
|
cd $(git rev-parse --show-toplevel)/assets/icon
|
|
|
|
src=wezterm-icon.svg
|
|
|
|
conv_opts="-colors 256 -background none -density 300"
|
|
|
|
# the linux icon
|
|
convert $conv_opts -resize "!128x128" "$src" ../icon/terminal.png
|
|
|
|
for dim in 16 32 128 256 512 1024 ; do
|
|
# convert is the imagemagick convert utility
|
|
convert $conv_opts -border '10%' -bordercolor 'rgba(0,0,0,0)' -resize "!${dim}x${dim}" "$src" "icon_${dim}px.png"
|
|
done
|
|
# png2icns is part of the libicns-utils on Fedora systems.
|
|
# It glues together the various png files into a macOS .icns file
|
|
png2icns ../macos/WezTerm.app/Contents/Resources/terminal.icns icon_*px.png
|
|
|
|
# Clean up
|
|
rm -f icon_*px.png
|
|
|
|
# The Windows icon
|
|
convert $conv_opts -define icon:auto-resize=256,128,96,64,48,32,16 $src ../windows/terminal.ico
|
|
|