Cross Domain True Type Font Files on Firefox

Firefox doesn’t want you linking to true type font files on a different domain than the page your on. There are security issues and copyright issues with doing so. To prevent this they detect if your true type font is cross domain and simple wont display it.

To get around this you need to server your true type font files embedded in CSS. This can be done by base64 encoding the actually true type font (.ttf) file and including it as data source in your CSS file. Great tutorial on how to do this here:

http://geoff.evason.name/2010/05/03/cross-domain-workaround-for-font-face-and-firefox/

One downside, is that your CSS file is going to be larger. This may be mitigated by the face that your browser is making fewer file requests onload.

Leave a Reply

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