Is there any way to add svg content to canvas in node
this what I need to add
<svg width="168" height="46" viewBox="0 0 168 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<text
fill="#12A59C"
xml:space="preserve"
style="white-space: pre"
font-family="Reenie Beanie"
font-size="64"
font-weight="500"
letter-spacing="0.02em"
>
<tspan x="2" y="44">
Exmaple
</tspan>
</text>
</svg>
to below canvas and save as png
const canvas = createCanvas(200, 200);
const ctx = canvas.getContext("2d");
const saveImage = () => {
fs.writeFileSync("test.png", canvas.toBuffer("image/png"));
};
saveImage();