I am writing/animating multiline SVG text using the tspan selector. Unfortunately every line (besides the first) has the beginning letters crammed towards the front. I have tried letter spacing and kearning, neither of which has helped. I need to use y and dy to establish vertical placement, but unfortunately that's what seems to be causing the issue. StartOffset was useless. Hoping someone might know the answer! See picture below and link to codepen [here
<div id="wavytext">
<h3>
<svg viewBox="50 -50 3000 550">
<path id="wave" d="M42.23,158.8C80.53,105.3,247.77,34.91,435.85,37.17c254,3,482.6,135.07,662.23,133.46,250-2.26,351.39-72.65,405.45-152"
/>
<text id="textwave" x="100" y="25"
dominant-baseline="central">
<textPath id="textpath" href="#wave">
<a href="https://www.breakpointbranding.com/services">
<tspan id="webdesign" x="15" y="50">+ CUSTOM WEBSITE DESIGN
<animate attributeName="x"
from="5%" to ="90%"
begin="webdesign.mouseover" dur="10s"
repeatCount="0" id="go"
end="webdesign.mouseout" dur="7.5s"
repeatCount="0" id="go"/>
</tspan></a>
<a href="https://www.breakpointbranding.com/services">
<tspan id="social" x="50" dy="2em">+ SOCIAL MEDIA MANAGEMENT
<animate attributeName="x"
from="10%" to ="90%"
begin="social.mouseover" dur="10s"
repeatCount="0" id="go"
end="social.mouseout" dur="7.5s"
repeatCount="0" id="go"/>
</tspan></a>
<a href="https://www.breakpointbranding.com/services">
<tspan id="designday" x="50" dy="2em">+ DESIGN DAY EXCLUSIVE
<animate attributeName="x"
from="12%" to ="90%"
begin="designday.mouseover" dur="10s"
repeatCount="0" id="go"
end="designday.mouseout" dur="7.5s"
repeatCount="0" id="go"/>
</tspan></a>
</text>
</svg>
</h3>
</div>
stacked SVG text tspan crunched
Hoping someone can assist in evenly spacing apart the letters of the SVG text on lines 2 and 3.
You are triggering buggy text layout by combining tspan and textPath. Get rid of the tspans and separate out your three text segments into three separately positioned text elements using transforms. Use (and animate) startOffset in the textPath for animation.
Here is a version that does not trigger buggy layout - start from here I'd advise.