scour
scour copied to clipboard
enhancement: apply transform="scale(10)" to font-size
I want to apply transform="scale(10)"
to font-size
,x
,y
,letter-spacing
Reason: Because of LibRSVG-Bug phab:T36947 (keringprecission) I need font-sizes above ~15px, therfore I scale SVGs with <g transform="scale(10)"></g>
up. (And it would reduce filesizes and make SVG easier to read/edit in Texteditor.)
Prozessing https://commons.wikimedia.org/wiki/File:Oxygen480-mimetypes-hidef-text-x-hex.svg:
$ scour input.svg.txt output.svg.txt
Input&Scour-Output: input.svg.txt
<?xml version="1.0" encoding="UTF-8"?>
<svg font-family="Liberation Mono" viewBox="0 0 1280 1280" xmlns="http://www.w3.org/2000/svg">
<text transform="scale(10)" x="10" y="10" font-size="3">0000:0000 | 4F 20 70 6F 65 74 61 20 | O poeta </text>
</svg>
desired Output output.svg.txt
<?xml version="1.0" encoding="UTF-8"?>
<svg font-family="Liberation Mono" viewBox="0 0 1280 1280" xmlns="http://www.w3.org/2000/svg">
<text x="100" y="100" font-size="30">0000:0000 | 4F 20 70 6F 65 74 61 20 | O poeta </text>
</svg>
differences: