Setting "allow pages to choose their own fonts" on a per-domain basis in Firefox

Solution 1:

There are two Firefox add-ons that are open-source and can be used to solve the problem in another way than setting "Allow pages to choose their own fonts":

  • Stylish
  • Stylus (a fork of Stylish)

Both add-ons allow to override the CSS styles of websites, and both support @-moz-document rules, which allow regex specifications for overridden websites, including negative look-ahead.

These examples come from the article Applying styles to specific sites:

An example of matching all sites with a certain exception:

@-moz-document regexp('(?!http://www\\.example\\.com).*') {
  /*
      the code in here applies to all URLs except those that start with 
      http://www.example.com
  */
}

An example of matching all except a specific section of a site:

@-moz-document regexp('http://www\\.example\\.com/(?!members).*') {
  /*
      the code in here applies to all URLs on http://www.example.com, except
      those under http://www.example.com/members
  */
}

Solution 2:

I've found a bug in the Bugzilla of Mozilla. If you still interested in this problem, you can add a comment with your requests.

https://bugzilla.mozilla.org/show_bug.cgi?id=568794

Solution 3:

I had a similar problem and found this plug-in:

https://addons.mozilla.org/en-US/firefox/addon/document-font-toggle/?src=api

It allows to toggle between choosing your own fonts and use the ones set by the site. It also has pre-sets for "always allow" and "always deny" by domain so you don't have to manually toggle.

Hope this is helpful.