It can be done utilizing an SVG, as shown in this answer: How to make spiral text in html using css or javascript
or you can play with the concept in this pen: https://codepen.io/geoffgraham/pen/NgwWBj
<svg viewBox="0 0 500 500">
<path id="curve" d="M73.2,148.6c4-6.1,65.5-96.8,178.6-95.6c111.3,1.2,170.8,90.3,175.1,97" />
<text width="500">
<textPath xlink:href="#curve">
Dangerous Curves Ahead
</textPath>
</text>