node-svg2img icon indicating copy to clipboard operation
node-svg2img copied to clipboard

Base64 font not rendering

Open bytesbay opened this issue 5 years ago • 1 comments

here is example of svg im trying to render

the image is rendering okay , but fonts are not loading :(

i checked this svg in chrome, it renders all okay btw

<svg data-v-41d8ab67="" id="editor_root_svg" preserveAspectRatio="xMinYMin meet" width="480" height="1032" viewBox="0 0 240 516" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="root-svg"> <defs data-v-41d8ab67=""> <style> @font-face { font-family: "dhurjati"; src: url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAARAQAABAAQR0RFRgSTCTwADpWEAAAAIkdQT1MAGQAMAA6VqAAAABBHU1VCUh891QAOlbgAADLgT1MvMl/g/q8ADjEUAAAAYGNtYXBHmVj8AA4xdAAAAVRjdnQgHDD6/..."); font-weight: normal; font-style: normal; } </style> </defs> <image data-v-41d8ab67="" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/..." x="0" y="0" height="100%" width="100%" preserveAspectRatio="xMidYMid slice" class="pointer-null"/> <g data-v-7563c99a="" data-v-41d8ab67="" transform="translate(16 85) rotate(-38.39071878687419 75 30)" pointer-events="bounding-box"> <svg data-v-7563c99a="" id="editor_item_13b0ae02-af84-4c89-a6a8-6bb04188ced4" width="150" height="60" viewBox="0 0 150 60" fill="#EB5757" data-draggable="true" class="markup-item"> <text data-v-7563c99a="" x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" style="font-family: dhurjati; font-size: 56px; font-weight: bold; font-style: normal; text-decoration: none;">HEADING TEXT</text> </svg> </g> </svg>

it uses the default Roboto font

bytesbay avatar Jan 09 '20 13:01 bytesbay

I have the same problem. I think it's just not supported by canvg yet.

kohjakob avatar Dec 30 '20 15:12 kohjakob