Loading ...
Sorry, an error occurred while loading the content.
 

Command to scale svg dimensions

Expand Messages
  • Eric Smith
    ... This is the command I used to scale my svg, it scaled all the things I needed including font sizes and stroke-width but of course is bound to leave some
    Message 1 of 1 , Dec 5 12:53 AM
      According to Max Dunn on Tue, Dec 04, 2001 at 07:58:41PM -0800:
      > Hi Eric,
      >
      > Great example, if you have the Perl command I'd appreciate it.
      >

      This is the command I used to scale my svg, it scaled all the
      things I needed including font sizes and stroke-width but of
      course is bound to leave some things out - if someone needs
      something added please let me know:


      perl -ne '$scale=5;s#(?<=")(\d{1,6}(?:\.\d{1,6})?)(px)?(?=")#$1/$scale#eg;s#(?<=font-size:)(\d*)(?=;)#$1/$scale#eg;s#(?<=stroke-width:)(\d{1,6})#$1/$scale#eg' input.svg > scaled_file.svg

      I am too lazy to make scripts of things - just run this on the
      command line.

      --
      Eric Smith
    Your message has been successfully submitted and would be delivered to recipients shortly.