diff --git a/.gitignore b/.gitignore index 95cd69349..5f8c39bc5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ tags build README.html linux-package +logo/*.iconset diff --git a/logo/kitty.png b/logo/kitty.png new file mode 100644 index 000000000..733134190 Binary files /dev/null and b/logo/kitty.png differ diff --git a/logo/kitty.svg b/logo/kitty.svg new file mode 100644 index 000000000..c97e6234e --- /dev/null +++ b/logo/kitty.svg @@ -0,0 +1,158 @@ + + + + + + + + + + image/svg+xml + + + + + Kovid Goyal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/logo/make.py b/logo/make.py new file mode 100755 index 000000000..ca57147cf --- /dev/null +++ b/logo/make.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 +# License: GPL v3 Copyright: 2017, Kovid Goyal + +import os +import subprocess +import shutil + +os.chdir(os.path.dirname(os.path.abspath(__file__))) +src = os.path.abspath('kitty.svg') + + +def render(output, sz=256): + print('Rendering at {0}x{0}...'.format(sz)) + subprocess.check_call(['rsvg-convert', '-w', str(sz), '-h', str(sz), '-o', output, src]) + subprocess.check_call(['optipng', '-quiet', '-o7', '-strip', 'all', output]) + + +render('kitty.png') +iconset = 'kitty.iconset' +if os.path.exists(iconset): + shutil.rmtree(iconset) +os.mkdir(iconset) +os.chdir(iconset) +for sz in (16, 32, 128, 256, 512, 1024): + iname = 'icon_{0}x{0}.png'.format(sz) + iname2x = 'icon_{0}x{0}@2x.png'.format(sz // 2) + render(iname, sz) + if sz > 16: + shutil.copy2(iname, iname2x) + if sz > 512: + os.remove(iname)