When I try to convert SVG to base 64 and given to image source I am not getting font-size, font-family but If I copy the SVG tag and placed it in HTML it's getting correctly, but it won't working for after base64 conversion can anyone help me on this
const svg = `
<svg viewBox="0 0 ${rects.width} ${rects.height}">
<text
x="0"
y="${Math.floor(
parseInt(this.typed_form.font_size, 10) * 1.33
)}"
font-family="${this.typed_form.font_family}"
font-size="${this.typed_form.font_size}"
fill="${this.typed_form.color}"
>${this.typed_form.value}</text>
</svg>
`;
const div = document.createElement("div");
const inner_tag = svg.trim();
div.innerHTML = inner_tag;
const s = new XMLSerializer().serializeToString(div.firstChild);
value = `data:image/svg+xml;base64,${window.btoa(s)}`;
<img data-v-302a5f22="" data-v-7a68f144="" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDIuNzE4NzUgNjYiPgogICAgICAgICAgICAgICAgPHRleHQgeD0iMCIgeT0iNDciIGZvbnQtZmFtaWx5PSJOdW5pdG8iIGZvbnQtc2l6ZT0iMzZwdCIgZmlsbD0icmdiKDI0MCwgMjUsIDI1KSI+c2FpcmFtPC90ZXh0PgogICAgICAgICAgICA8L3N2Zz4=" alt="Signature">