Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've been having some trouble understanding this issue.

I'm trying to use an @font-face font on a subdomain, say mysite.example.com. The "src" of the font face would be something along the lines of url('http://www.example.com/myfont.woff").

I've tried putting the CSS file on the subdomain, as well as the main domain, and in both cases Firefox will not respect the font-face. The font-face works in Chrome and Safari (haven't tried IE yet).

If I move the woff file to the subdomain, it works fine. So I think the issue is with crossing domains.

However, if I link to a Google-hosted web font, it works fine. Unfortunately, Google Web Fonts does not have the font I need.

I know the easy solution to host the font on the subdomain, but I'm trying to avoid too much duplication and would prefer to serve this font and CSS for the font on the main domain.

Any ideas on how to get this to work? Why would it work for Google fonts but not mine?

share|improve this question
    
    
You're absolutely correct, its a cross domain issue and you might find that IE9 does the same. I created fonts.mysite.com and used that to get around the problem (also helps with optimization) –  toomanyairmiles Feb 2 '12 at 16:41
add comment

closed as off topic by danlefree Feb 2 '12 at 15:11

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.