Bug#778477: vim-common: vim.svg has non-square bounding box, appears distorted in GNOME Shell

Simon McVittie smcv at debian.org
Sun Feb 15 15:47:31 UTC 2015

Package: vim-common
Version: 2:7.4.488-5
Severity: normal

Since version 2:7.4.488-5, the vim icon appears distorted in GNOME Shell
(see attached). I believe this is because the new conversion from PDF
to SVG leaves /usr/share/icons/hicolor/scalable/apps/vim.svg with the
whole PDF page as its bounding box: the file starts with

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="612pt" height="792pt" viewBox="0 0 612 792" version="1.1">

Opening vim.svg in, for instance, ImageMagick's display(1) does not
demonstrate this, because display(1) only shows the parts of the image
that contain objects; but opening it in Inkscape shows the entire page.

SVG icons normally have a square bounding box, e.g. iceweasel.svg:


GNOME Shell draws the SVG icon with its entire bounding box,
not just the parts containing visible objects, so that icons
can have spaces around the edges if that is what the icon
designer wanted.

It would probably be possible to postprocess the SVG with
xmlstarlet to assign a suitable bounding box. Alternatively,
using vimlogo.eps instead of vimlogo.pdf as your source format
would probably work, since vimlogo.eps seems to have the correct
bounding box already.


-- System Information:
Debian Release: 8.0
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vim-common depends on:
ii  libc6  2.19-15

Versions of packages vim-common recommends:
ii  vim-gtk [vim]  2:7.4.488-5
ii  vim-tiny       2:7.4.488-5

vim-common suggests no packages.

-- no debconf information

More information about the pkg-vim-maintainers mailing list