mirror of
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git
synced 2024-10-18 01:00:35 -04:00
ffsvg.sh: handle 0 and 0.00n+ numbers in x|y|rx|ry
This commit is contained in:
parent
3c1ca898d6
commit
a92f098588
1 changed files with 9 additions and 0 deletions
|
@ -148,6 +148,10 @@ s/[ ]white-space="normal"//gI
|
|||
s/[ ]word-spacing="normal"//gI
|
||||
s/[ ]writing-mode="lr-tb"//gI
|
||||
|
||||
# round decimal expansion to zero in x=, y=, rx=, ry= attributes
|
||||
s/([ ]x|y|ry|rx)="[0-9.]+e-[0-9]+"/\1="0"/gI
|
||||
s/([ ]x|y|ry|rx)="[0-9]?.00[0-9]+"/\1="0"/gI
|
||||
|
||||
# delete attributes with nonsense values
|
||||
s/[ ]fill-opacity="[1-9][0-9.]*"//gI
|
||||
s/[ ]fill="(#000|#000000|black)"//gI
|
||||
|
@ -156,6 +160,11 @@ s/[ ]flood-opacity="[1-9][0-9.]*"//gI
|
|||
s/[ ]opacity="[1-9][0-9.]*"//gI
|
||||
s/[ ]stroke-opacity="[1-9][0-9.]*"//gI
|
||||
|
||||
# delete nonsense values for rounded corners of rectangles
|
||||
/<rect/ {
|
||||
s/[ ](ry|rx)="(0|0?.0[0-9]+)"//gI
|
||||
}
|
||||
|
||||
# delete 'stroke- *' properties if an object doesn't have a stroke
|
||||
/stroke[:=]/! {
|
||||
s/[ ]stroke-width="[^"]+"//gI
|
||||
|
|
Loading…
Reference in a new issue