Skip to content

Commit

Permalink
A new high resolution calibre logo
Browse files Browse the repository at this point in the history
The old log was only available as a raster image at 512x512. This is
insufficient for the splash screen on high DPI monitors. So create a new
SVG logo (similar in look to the old one, but simplified).
  • Loading branch information
kovidgoyal committed Aug 30, 2016
1 parent db2fdbc commit 6211846
Show file tree
Hide file tree
Showing 15 changed files with 796 additions and 11 deletions.
Binary file modified icons/book.icns
Binary file not shown.
Binary file modified icons/calibre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/ebook-edit.ico
Binary file not shown.
Binary file modified icons/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions icons/icns/make_iconsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
os.chdir(base)

imgsrc = j(d(d(base)), 'imgsrc')
sources = {'calibre':j(d(base), 'calibre.png'), 'ebook-edit':j(imgsrc, 'tweak.svg'), 'ebook-viewer':j(imgsrc, 'viewer.svg'), 'book':j(imgsrc, 'book.svg')}
sources = {'calibre':j(imgsrc, 'calibre.svg'), 'ebook-edit':j(imgsrc, 'tweak.svg'), 'ebook-viewer':j(imgsrc, 'viewer.svg'), 'book':j(imgsrc, 'book.svg')}

for name, src in sources.iteritems():
iconset = name + '.iconset'
Expand All @@ -39,7 +39,7 @@
os.remove(iname)
for name in (iname, iname2x):
if os.path.exists(name):
subprocess.check_call(['optipng', '-o7', name])
subprocess.check_call(['optipng', '-o7', '-strip', 'all', name])
finally:
os.chdir('..')

Binary file modified icons/library.ico
Binary file not shown.
30 changes: 30 additions & 0 deletions icons/make_ico_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)

__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'

import os, shutil, subprocess

d, j, a = (getattr(os.path, x) for x in ('dirname', 'join', 'abspath'))
base = d(a(__file__))
os.chdir(base)

imgsrc = j(d(base), 'imgsrc')
sources = {'library':j(imgsrc, 'calibre.svg'), 'ebook-edit':j(imgsrc, 'tweak.svg'), 'viewer':j(imgsrc, 'viewer.svg'), 'favicon':j(imgsrc, 'calibre.svg')}

for name, src in sources.iteritems():
os.mkdir('ico_temp')
try:
names = []
for sz in (16, 32, 48, 256):
iname = os.path.join('ico_temp', '{0}x{0}.png'.format(sz))
subprocess.check_call(['rsvg-convert', src, '-w', str(sz), '-h', str(sz), '-o', iname])
subprocess.check_call(['optipng', '-o7', '-strip', 'all', iname])
names.append(iname)
names[-1:-1] = ['-r']
subprocess.check_call(['icotool', '-c', '--output=' + name+'.ico'] + names)
finally:
shutil.rmtree('ico_temp')
Binary file modified icons/viewer.ico
Binary file not shown.
Loading

0 comments on commit 6211846

Please sign in to comment.