搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

@font-face doesn't work with external links, leaving me with no solution on my Tumblr but to not support Firefox

  • 2 回覆
  • 3 有這個問題
  • 9 次檢視
  • 最近回覆由 KateL2

more options

If I want to use custom fonts on my tumblr, I have to host them on an external server. Firefox is the only browser which blocks this option. How do I overcome it?

If I want to use custom fonts on my tumblr, I have to host them on an external server. Firefox is the only browser which blocks this option. How do I overcome it?

所有回覆 (2)

more options

That is only possible if that server send the file with a special HTTP Access Control response header.

See:

In Gecko, web fonts are subject to the same domain restriction (font files must be on the same domain as the page using them), unless HTTP access controls are used to relax this restriction.

more options

I just downloaded Firefox 19.0.2. I had a problem using @font-face with a font squirrel webkit. The fonts wouldn't display properly in Firefox, but they were fine in Safari and Chrome.

Turns out there is a hidden preference in Firefox that needs to be checked in order for Firefox to display custom fonts on a web page.

Firefox Preferences > Content > Fonts & colors > Advanced button > and check the box "Allow pages to use their own fonts, instead of my selections above"

This solved the problem for me, after spending about 4 hours today trying various code alterations that didn't work. Aaargh!

Now Firefox displays the fonts the same as Safari and Chrome.

由 KateL2 於 修改