9.8 Text on a path

To display text on a path:

Example 1. Text centered along the path with path shown

Quadratic Bezier curve
<svg width="200" height="100" xmlns="http://www.w3.org/2000/svg">
   <defs>
       <path id="curvepath" 
          d="M 10 50 Q 50 10 100 50 T 190 50" style="stroke:#ddd; stroke-width:2; fill:none"/>
   </defs>
   <use xlink:href="#curvepath"/>
   <text >               
      <textPath xlink:href="#curvepath" 
                startOffset="50%" text-anchor="middle">
                Quadratic Bezier curve
      </textPath>
   </text>
</svg>

Example 2. Text with adjusted length to the path

Quadratic Bezier curve
<svg width="200" height="100" xmlns="http://www.w3.org/2000/svg">
   <use xlink:href="#curvepath"/>
   <text textLength="200" lengthAdjust="spacing">               
      <textPath xlink:href="#curvepath">
                Quadratic Bezier curve
      </textPath>
   </text>
</svg>