SVG字母间距也适用于Mozilla Firefox

问题描述:

SVG文字而言,字母间距是否还有另一种选择?

Is there another alternative to letter-spacing in terms of SVG text?

此代码在Chrome上运行,但在 Firefox :

https://developer.mozilla.org/de/docs/Web/CSS/letter -spacing

如您所见,由于错误,Firefox现在不支持它.但是我确实需要在两个浏览器中都使用字母间距.那么SVG文本有很好的替代方案吗?

As you can see there Firefox is not supporting it right now due to a bug. But I really need letter-spacing in both browser. So is there a good anternative for SVG text?

单词间距上也是如此.可以在Chrome上完美运行,但不能在Firefox上运行.

Btw the same is on word-spacing. Working in Chrome perfectly but not on Firefox.

我的解决方案是我在QGIS中使用(多个)空格创建字符串.这是不好的方法,因为如果您想给所有元素更大的空间,则需要花费很长时间.

My solution was that I create the strings with (multiple)whitespaces in QGIS. This is bad way because if you want to give all elements a bigger space it takes a long time.

但这很容易,并且可以在任何浏览器上以相同的方式工作.因此,如果您将数据存储在geojson或topojson中,这就是方法.

But it is easy and works on any browser in the same way. So this is the way to go if you have your data in geojson or topojson.