8
\$\begingroup\$

Recently, Stack Exchange decided to switch to system fonts. For those of you who prefered the old appearance, or would like a different font to appear in code blocks or across the site as a whole, Custom Fonts is a user script I wrote this morning to allow just that.

Features

Custom Fonts allows rules to be set for different sites, which can specify a sans serif, serif, and monospace font. A default can also be specified, allowing you to choose between sans serif and serif for any site.

Custom Fonts initially doesn't change anything (unless you download one with a preset), but on lines 26 and 27 are rules that revert all of Stack Exchange to its original fonts (once un-commented). Custom rules can be written, and there is a short reference in the comments under the Rules object.

Download

Custom Fonts is a user script, meaning that it requires Greasemonkey (Firefox or browsers that support Firefox extensions) or Tampermonkey (Chrome or browsers that support Chrome extensions) to be installed.

Custom Fonts 1.2.4

Custom Fonts 1.2.4, with original fonts

Custom Fonts 1.2.4, with Roboto + Roboto Mono

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Is there any benefit to using a user script over a user stylesheet? \$\endgroup\$
    – Adám
    May 10 at 16:59
  • \$\begingroup\$ @Adám Not really, but for people who don't have user stylesheet tools installed this is a very easy way to insert (and customize) the needed CSS \$\endgroup\$ May 10 at 17:00
  • 1
    \$\begingroup\$ Thanks. For configuration I found that looks best with php.net's fonts: var sans = '"Fira Sans", "Source Sans Pro", Helvetica, Arial, sans-serif'; and var mono = '"Fira Mono", "Source Code Pro", monospace';. \$\endgroup\$
    – manatwork
    May 12 at 18:54

You must log in to answer this question.

Browse other questions tagged .