• icon_rss
  • icon_fb
  • icon_twitter
  • icon_linkin

Posts Tagged ‘font-face’

@font-face and Firefox

Since I moved to Chrome a while ago and left mozilla behind for getting bulky and slow, I’ve been developing in Chrome most of the time.

By chance I ended up opening my site in Mozilla today to notice strange things going on with the @font-face declarations in my CSS, because my site uses either a .com extension or a .info Mozilla thinks they are too different sites and wouldn’t let the fonts load from one to the other.

The solution is quite simple, if your already have a .htaccess file add the following rules:

<FilesMatch "\.(ttf|otf)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

Although the asterisk might be to permissive you can change the asterisk for a domain or in the case of more than one domain just duplicate the whole “Header set Access-Control-Allow-Origin “domain1.com” ” line and change the domain.