Open HackbrettXXX opened 5 years ago
This is a minor issue. This would require a lot of work that is probably not worth the investment. There are more complex issues with font rendering and font-kerning that should be addressed, first, IMHO.
I may have a solution that involves measuring the text a few times, I'll code it up and see how well it works.
There also appears to be a difference between Chrome and Firefox when it comes to inter-tspan kerning. Chrome behaves like font-kerning
is set to none
whereas Firefox applies kerning.
<svg font-family="serif" viewBox="0 0 550 600" xmlns="http://www.w3.org/2000/svg">
<text y="50" x="20" style="font-kerning: auto;"><tspan>agbW</tspan><tspan>A</tspan></text>
<text y="70" x="20" style="font-kerning: auto;">agbWA</text>
<text y="90" x="20" style="font-kerning: none;"><tspan>agbW</tspan><tspan>A</tspan></text>
</svg>
@Mrfence97 thanks for digging into this. Did you make any progress?
The space between the following tSpans is slightly too large
compared to