SVG 格式在 Chrome 中正确,但在 Inkscape 中不正确

SVG formats correctly in Chrome but not in Inkscape

我有一个简单的 SVG 文件,显示了一个双头水平箭头,中间有一个标记,标记下方有“1/2”文本。

它在 Chrome 和 Firefox 中显示正常,但是当用 Inkscape 等 SVG 应用程序打开时它是乱码。

这是它在 FF 中的样子:

这是它在 Inkscape 中的样子:

代码在这里:

    <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="1200" height="120" xmlns="http://www.w3.org/2000/svg" version="1.1">
 <g stroke="blue" > 

  <!-- Horizontals -->

  <line x1="0" y1="50" x2="1200" y2="50" style="stroke: #6666ff; stroke-width: 6px; fill: none; " />

  <!-- Arrows -->

  <line y1="50" x1="0" y2="35" x2="40" stroke-width="3" />
  <line y1="50" x1="0" y2="65" x2="40" stroke-width="3" />
  <line y1="50" x1="1200" y2="35" x2="1160" stroke-width="3" />
  <line y1="50" x1="1200" y2="65" x2="1160" stroke-width="3" />

  <!-- Verticals -->

  <line y1="35" x1="50%" y2="65" x2="50%" stroke-width="3" />

  <!-- Numbers -->

  <text text-anchor="middle" x="50%" y="80%" dy=".35em" font-family="sans-serif" font-size="20px" stroke="red" >1/2</text>


 </g>
</svg>

请帮忙。

Inkscape 似乎不支持百分比/相对位置,所以它将它定位在坐标 0,0。

看看 https://bugs.launchpad.net/inkscape/+bug/384301,另一个用户有同样的问题,以及可能的解决方案和指南。