Jack Scott
Jack Scott

Reputation: 119

How do I get the font in an SVG to display in the web page?

I have uploaded an SVG to my website, but the font is not displaying correctly. It is defaulting to Times.

I've tried importing Josefin Sans from fonts.google.com, and embedding the link in the tag.

novagrappling.com/rules

Upvotes: 1

Views: 1437

Answers (1)

Salman
Salman

Reputation: 112

Please embed your google font in your SVG using , here is the code which i have applied in your SVG, it's working perfectly.enter image description here

<defs>
  <style type="text/css">
    @import url('https://fonts.googleapis.com/css?family=Josefin+Sans');
    text
    {
    font-family: 'Josefin Sans', sans-serif;

    }
    tspan
    {
    font-family: 'Josefin Sans', sans-serif;

    }
 </style>
</defs>

Upvotes: 1

Related Questions