CSS3 @font-face and sub domains

As many of you have probably noticed, I use two non-system fonts on this site for the headings. I build my sites initially using Chrome which showed the fonts working perfectly on both my main sites pages as well as the blog which is viewed via sub domain. Upon doing some cross-browser testing I quickly noticed that both Firefox and IE didn’t display the fonts on this blog site, even though the font were relative to the CSS file on the sub domain. Scratching my head for a bit, I found a little ‘.htaccess’ code helped this issue along:
<FilesMatch "\.(ttf|otf|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

Leave a Reply

Your email address will not be published. Required fields are marked *