Skip to content

@font-face set mime types for......

* css
@font-face {
    font-family: 'fontName';
    src: url('fontName.eot');
    src: url('fontName.eot?#iefix') format('embedded-opentype'),
         url('fontName.woff') format('woff'),
         url('fontName.ttf') format('truetype'),
         url('fontName.svg#AftaserifRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}

* IIS (system.webServer)
<system.webServer>
<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>
</system.webServer>

* cross-domain 
  .htaccess - apache config
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
or
 .htttped.conf - nginx config
if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
add_header Access-Control-Allow-Origin *;
}

comments 0

leave comments

Powered by Textyle

Design & UI Develop By The RaiN Story

Admin