T
T
thorii2018-02-27 18:53:56
css
thorii, 2018-02-27 18:53:56

Why are SVG fonts not loading?

An SVG image has text in a specific font, which is included inside the SVG code.

<defs
     id="defs4514">

        <style type="text/css">
          @font-face {
            font-family: 'Comfortaa';
            font-style: normal;
            font-weight: 400;
            src: local('Comfortaa Regular'), local('Comfortaa-Regular'), url(https://fonts.gstatic.com/s/comfortaa/v12/1Ptsg8LJRfWJmhDAuUs4TYFq.woff2) format('woff2');
            unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
          }
        </style>
</defs>

Wrapping the font-face declaration in CDATA has no effect
When placed on the page, the font is ignored When only images are opened in the browser, the font is loaded, why is that?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question