Path上にtext配置
<defs>を使うには、xmlns属性xmlns:xlink="http://www.w3.org/1999/xlink"を追加しないといけないようだ https://svg-hosting.vercel.app/api/svg?url=https://scrapbox.io/api/code/takker/Path%E4%B8%8A%E3%81%ABtext%E9%85%8D%E7%BD%AE/image.svg
code:image.svg
viewBox="50 -20 700 70">
<defs>
<path id="s04"
d="M 20,60 C 80,-20 180,100 240,20"
stroke="black" fill="none"
transform="scale(3,1)" />
</defs>
<text font-size="60" dx="10" dy="-5" fill="red">
<textPath xlink:href="#s04">
Scrapboxもっと流行れ
</textPath>
</text>
</svg>