Re: Including scalable icons to improve size coverage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Clasen wrote:
It would be very valuable if someone could work on a little script to get rid of the thumbnails and the illustrator-specific stuff. That should allow us to shrink the svgs _a lot_ and make it possible to
include them in the package, which is not possible as things stand right
now.

I wrote the script you asked for. It removes the following elements:
i:pgf (where the ID is "adobe_illustrator_pgf"), i:pgfRef and x:xmpmeta. Attached is a trimmed version of one of the icons (416k to 18k) . People should check it works on their svg tool before you start compressing icons.
#!/usr/bin/perl

use XML::Twig;

  my $twig=XML::Twig->new(twig_handlers => {
        'i:pgf' => sub {
            if ($_->{'att'}->{'id'} eq 'adobe_illustrator_pgf'){
                $_->delete;
            }
        },
        'i:pgfRef' => sub {
            $_->delete;
        },
        'x:xmpmeta' => sub {
            $_->delete;
        },
        
    }
  
  );    # create the twig
  $twig->parsefile('-');        # build it
  $twig->print;                 # output the twig

image/svg

_______________________________________________
Fedora-art-list mailing list
Fedora-art-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-art-list

[Index of Archives]     [Fedora Music]     [Fedora Development]     [Linux Kernel]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Directory]     [PAM]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux