搜尋 Mozilla 技術支援網站

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

Learn More

Implemented Font is shown in Chrome, but not in Firefox

  • 2 回覆
  • 1 有這個問題
  • 13 次檢視
  • 最近回覆由 cor-el

more options

Hi COmmunity,

i am using following font for my website, which is shown in chrome and edge but not in fireforx.

<link href="css/fonts/sf-sports-night.regular.tff">

I found some config solutions:

Firefox comes with a very strict "file uri origin" (file:///) policy by default: to have it to behave just as other browsers, go to about:config, filter by fileuri and toggle the following preference:

security.fileuri.strict_origin_policy

Where can i set the value to false for that attribute?

Hi COmmunity, i am using following font for my website, which is shown in chrome and edge but not in fireforx. <link href="css/fonts/sf-sports-night.regular.tff"> I found some config solutions: Firefox comes with a very strict "file uri origin" (file:///) policy by default: to have it to behave just as other browsers, go to about:config, filter by fileuri and toggle the following preference: security.fileuri.strict_origin_policy Where can i set the value to false for that attribute?

所有回覆 (2)

more options

Hi, fileuri preferences are for file:// addresses; they are not relevant to websites where the font is on an http:// or https:// URL.

I'm not clear on how you are loading and applying the font. Does that link tag load a style sheet which specifies the font file path with the @font-face property?

https://developer.mozilla.org/docs/Web/CSS/@font-face

more options

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?

Make sure you allow pages to choose their own fonts.

  • Options/Preferences -> General: Fonts & Colors -> Advanced
    [X] "Allow pages to choose their own fonts, instead of my selections above"

There are extensions that can block downloadable fonts. If you use uBlock Origin make sure not to "block remote fonts".

You can check the Web Console (Tools -> Web Developer) for messages about blocked content and about the presence of mixed or unsafe content.

You can check the Network Monitor to see if content is blocked or otherwise fails to load.

If necessary use "Ctrl+F5" or "Ctrl+Shift+R" (Mac: Command+Shift+R) to reload the page and bypass the cache to generate a fresh log.