This is an example from my blog on Placing Texts on Arcs with D3.js in which the texts are placed inside D3 created arcs. All without writing the SVG path notations yourself.
Other examples of text along a path from the same blog
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js