scour icon indicating copy to clipboard operation
scour copied to clipboard

scour removes font-style=

Open JoKalliauer opened this issue 6 years ago • 1 comments

scour (independent on the options) leads to a removement of font-style="italic" and font-style="normal" maybe related #228

Input

Input.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg width="214.25mm" height="102.31mm" font-family="Arial" font-size="4.939" font-weight="bold" letter-spacing="0" stroke-width=".265" text-anchor="middle" word-spacing="0" viewBox="55.12 151.57 214.249 102.308" xmlns="http://www.w3.org/2000/svg">
 <text x="103.48" y="178.14"><tspan x="103.48" y="178.14" font-style="italic" font-weight="normal">t<tspan baseline-shift="sub" font-size="65%" font-style="normal">0</tspan> +t<tspan font-style="normal" baseline-shift="sub" font-size="65%">12</tspan></tspan></text>
 <text x="103.25" y="192.79"><tspan x="103.25" y="192.79" font-style="italic" font-weight="normal">t<tspan baseline-shift="sub" font-size="3.21" font-style="normal">0</tspan> +h+t<tspan font-style="normal" baseline-shift="sub" font-size="3.21">12</tspan></tspan></text>
 <text x="103.91" y="243.2"><tspan x="103.91" y="243.2" font-style="italic" font-weight="normal">t<tspan baseline-shift="sub" font-size="3.21" font-style="normal">0 </tspan>+ k.h + t<tspan font-style="normal" baseline-shift="sub" font-size="3.21">12</tspan></tspan></text>
</svg>

Input

Output

Output.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg width="214.25mm" height="102.31mm" font-family="Arial" font-size="4.939" font-weight="bold" letter-spacing="0" stroke-width=".265" text-anchor="middle" word-spacing="0" viewBox="55.12 151.57 214.25 102.31" xmlns="http://www.w3.org/2000/svg">
 <text x="103.48" y="178.14"><tspan x="103.48" y="178.14" font-weight="normal">t<tspan baseline-shift="sub" font-size="65%">0</tspan> +t<tspan baseline-shift="sub" font-size="65%">12</tspan></tspan></text>
 <text x="103.25" y="192.79"><tspan x="103.25" y="192.79" font-weight="normal">t<tspan baseline-shift="sub" font-size="3.21">0</tspan> +h+t<tspan baseline-shift="sub" font-size="3.21">12</tspan></tspan></text>
 <text x="103.91" y="243.2"><tspan x="103.91" y="243.2" font-weight="normal">t<tspan baseline-shift="sub" font-size="3.21">0 </tspan>+ k.h + t<tspan baseline-shift="sub" font-size="3.21">12</tspan></tspan></text>
</svg>

Output

Copyright

source: https://commons.wikimedia.org/wiki/File:Transit_timetable.svg

author: https://commons.wikimedia.org/wiki/User:Sushant_savla

license: https://creativecommons.org/licenses/by-sa/4.0

JoKalliauer avatar Jul 17 '19 20:07 JoKalliauer

At least the font-style="italic" issue is related to #209. I suspect but am not entirely sure that the font-style="normal" is pruned as a side-effect (because it is now "the default" rather than overriding the parent tag setting). I think we should fix #209 first and then retest this afterwards.

nthykier avatar Jun 10 '20 19:06 nthykier