I have been doing asp.net web development for a while but never implemented a complete asp.net website and hosted it. I have been working on an asp.net web site and hosted it on windows server.
I have couple of custom web fonts (paid fonts) which i am using in the site. I have included the files for the web fonts and styles in my project folder and referenced them properly in my style sheet.
I have used the @font-face in referring the fonts in my style sheet:
@font-face {
font-family: 'fontname';
src: url('/fonts/webfonts/font.eot');
src: url('/fonts/webfonts/font.eot?#iefix') format('embedded-opentype'),
url('/fonts/webfonts/font.woff') format('woff'),
url('/fonts/webfonts/font.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
But, the web fonts are not being loaded in the web site.
After some research I found we need to add the mime type in web.config type for windows server to recognize that format of fonts. Then, I also referenced the mime types in the web.config file as follows:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>
</system.webServer>
But, it is also not working. Can anyone please let me know, how can we load those fonts.