simg icon indicating copy to clipboard operation
simg copied to clipboard

using external fonts

Open DaanH opened this issue 9 years ago • 2 comments

When trying to convert a svg that uses a googlefont (Hind), the resulting img displays text using a fallback font, Arial I think. I have set the font-family style on the root svg element and the svg itself renders fine. Is there a way to convince Simg to use the correct fonts?

<svg width="500" height="600" id="diagram" transform="translate(-.5,-.5)" style="width: 500px; height: 600px; font-family: Hind; font-weight: 500; font-size: 16px; fill: white;" version="1.1" xmlns="http://www.w3.org/2000/svg"><g class="cell" transform="translate(135,46)"><rect rx="4" ry="4" x="2" y="2" width="149" height="81" style="fill: rgb(31, 119, 180);"></rect><text x="20" y="33"><tspan x="20" dy="16px">Stedelijke</tspan><tspan x="20" dy="16px">ontwikkeling</tspan></text><text x="113" y="65">8.8</text></g></svg>

DaanH avatar Jan 06 '16 14:01 DaanH

Hi, apologies for the delay. If you can link me to an example HTML page with this 3rd party font working online I can try to get it to work.

krunkosaurus avatar Oct 22 '16 00:10 krunkosaurus

Here's an example showing this issue

simg.zip

talelamira avatar Sep 24 '18 13:09 talelamira