X
Tap here to go to the mobile version of the site.

Support Forum

force font in a specific domain...

Posted

I prefer a specific font across most sites. However, with 'Allow pages to use their own fonts...' unchecked, is it possible to force a single domain to use its' own fonts with css?

I prefer a specific font across most sites. However, with 'Allow pages to use their own fonts...' unchecked, is it possible to force a single domain to use its' own fonts with css?

Additional System Details

Installed Plug-ins

  • Shockwave Flash 14.0 r0
  • VLC media player Web Plugin 2.2.0
  • Creative Cloud Desktop Plugin.v_2_0_0_0
  • 5.1.30514.0
  • The plugin allows you to have a better experience with Microsoft SharePoint

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:31.0) Gecko/20100101 Firefox/31.0 Waterfox/31.0

More Information

cor-el
  • Top 10 Contributor
  • Moderator
12905 solutions 118365 answers

You can specify the font with code in userContent.css.


@-moz-document domain(<enter domain>){
html, body, body * { font-family: "<font name>" !important; }
}

The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

  • Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
  • Use a plain text editor like Notepad to create a (new) userContent.css file in the chrome folder (file name is case sensitive)
  • Paste the code in the userContent.css file in the editor window
  • Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userContent.css.
    Otherwise Windows may add a hidden .txt file extension and you end up with a not working userContent.css.txt file
You can specify the font with code in userContent.css. *http://kb.mozillazine.org/userContent.css *https://developer.mozilla.org/en/CSS/@document *https://developer.mozilla.org/Web/CSS/font-family *https://developer.mozilla.org/Web/CSS/font ---- <pre><nowiki>@-moz-document domain(<enter domain>){ html, body, body * { font-family: "<font name>" !important; } }</nowiki></pre> ---- The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder. *http://kb.mozillazine.org/Editing_configuration *Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist *Use a plain text editor like Notepad to create a (new) userContent.css file in the chrome folder (file name is case sensitive) *Paste the code in the userContent.css file in the editor window *Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userContent.css.<br>Otherwise Windows may add a hidden .txt file extension and you end up with a not working userContent.css.txt file

Modified by cor-el

Question owner

Thanx cor-el... I should have been more specific. I'm already utilizing a userContent.css file... A handful of sites do not display certain icons correctly if they are not allowed to use their own fonts. I would like to keep 'Allow pages to use their own fonts...' UNchecked in options but force a specific domain to behave as if it is checked. This way I can view them as is determined by the site meanwhile the rest of the web is using the font(s) specified in userContent.css. I hope this is clearer...

Thanx cor-el... I should have been more specific. I'm already utilizing a userContent.css file... A handful of sites do not display certain icons correctly if they are not allowed to use their own fonts. I would like to keep 'Allow pages to use their own fonts...' UNchecked in options but force a specific domain to behave as if it is checked. This way I can view them as is determined by the site meanwhile the rest of the web is using the font(s) specified in userContent.css. I hope this is clearer...
cor-el
  • Top 10 Contributor
  • Moderator
12905 solutions 118365 answers

What code do you use in the userContent.css file? Is that site specific with @-moz-document domain(){} rules or generic CSS rules for all websites?

What code do you use in the userContent.css file? Is that site specific with @-moz-document domain(){} rules or generic CSS rules for all websites?

Question owner

I'm using a specific font for all websites. This works just fine on 99% of the sites I visit... However, discogs.com (for example) will not display some icons correctly unless 'Allow pages to use their own fonts...' is checked.

I'm using a specific font for all websites. This works just fine on 99% of the sites I visit... However, discogs.com (for example) will not display some icons correctly unless 'Allow pages to use their own fonts...' is checked.