Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non breaking and small spaces should not be converted to normal white spaces #1125

Closed
JoKalliauer opened this issue Jul 6, 2019 · 1 comment

Comments

@JoKalliauer
Copy link

JoKalliauer commented Jul 6, 2019

Processing File:Comparison_satellite_navigation_orbits.svg leads to a change in spaces.

svgo -i Input.svg.txt -o Output.svg.txt

Input

Input.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox=".1875 1.2734 210.13 81.613" xmlns="http://www.w3.org/2000/svg">
 <g fill="#f00">
  <text y="50" font-size="24px"><tspan>Inner Van</tspan> <tspan x="0" y="80">Allen belt</tspan></text>
  <text x="150" y="20" font-size="40px"><tspan x="0" y="20" font-size="28px">(GEO+300 km)</tspan></text>
 </g>
 <g fill="#0b0">
  <text y="50" font-size="24px"><tspan>Inner   Van</tspan> <tspan x="0" y="80">Allen   belt</tspan></text>
  <text y="20" font-size="40px"><tspan x="0" y="20" font-size="28px">(GEO+300 km)</tspan></text>
 </g>
</svg>

Input

Output

Output.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0.188 1.273 210.13 81.613" xmlns="http://www.w3.org/2000/svg">
 <g fill="red">
  <text y="50" font-size="24">
   <tspan>Inner Van</tspan> <tspan x="0" y="80">Allen belt</tspan>
  </text>
  <text x="150" y="20" font-size="40">
   <tspan x="0" y="20" font-size="28">(GEO+300 km)</tspan>
  </text>
 </g>
 <g fill="#0b0">
  <text y="50" font-size="24">
   <tspan>Inner Van</tspan> <tspan x="0" y="80">Allen belt</tspan>
  </text>
  <text y="20" font-size="40">
   <tspan x="0" y="20" font-size="28">(GEO+300 km)</tspan>
  </text>
 </g>
</svg>

Output

Copyright

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

author: Cmglee, Geo Swan

license: CC-BY-SA 3.0

@TrySound
Copy link
Member

Fixed in https://github.com/svg/svgo/releases/tag/v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants