Web fonts are not being rendered

Some of our themes use CSS3 web fonts, a great feature that allows the use of any font type natively by the browser.

Sometimes these fonts are just not rendered. The problem is that IIS doesn’t know how to serve these new files unless we tell it how. This can be easily done by editing file web.config, section <system.webServer>, and by adding the following snippet:

<staticContent>
    <remove fileExtension=".eot" />
    <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
    <remove fileExtension=".ttf" />
    <mimeMap fileExtension=".ttf" mimeType="font/ttf" />
    <remove fileExtension=".otf" />
    <mimeMap fileExtension=".otf" mimeType="font/otf" />
    <remove fileExtension=".woff" />
    <mimeMap fileExtension=".woff" mimeType="font/x-woff" />
</staticContent>
Have more questions? Submit a request

Comments

  • Avatar
    Melissa Dickinson

    Hi Beatriz,

    Hi Beatriz, I see two sections in the system.webServer section. One says modules and the other says handlers. Which section does this code snippet go in? Thank you.

  • Avatar
    Melissa Dickinson

    I tried adding this code under the system.webServer section (not inside any subsection) but nothing changed. Fonts still don't display. Here's my test site:

    http://mcqsidlaw.com.dnnmax.com

Got a question?

If you can't find the answer to your question, you can contact us.
We are here and happy to help.

Powered by Zendesk