The Computer Oracle

Force chrome to use my preferred font over the author's

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Beneath the City Looping

--

Chapters
00:00 Force Chrome To Use My Preferred Font Over The Author'S
00:31 Accepted Answer Score 7
01:09 Answer 2 Score 2
01:32 Answer 3 Score 1
01:46 Answer 4 Score 1
02:16 Thank you

--

Full question
https://superuser.com/questions/1209191/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#googlechrome #fonts

#avk47



ACCEPTED ANSWER

Score 7


I'm pretty comfortable with a chrome extension called "Read Mode" very readable. A drawback is improper display of quoted text. So I'm sticking with it till I find a better alternative.

Edit: Find out another one, it is a JavaScript bookmarklet, put the following line in the location bar(where you put website adresses like www.site.com) and hit ENTER :

    javascript:Array.prototype.forEach.call(document.getElementsByTagName("*"),
function(e){e.style.fontFamily ="Source Sans Pro"})

Replace Source Sans Pro with your preferred font.

If you don't want to type this every time, bookmark it and click on it whenever you try to change the font.




ANSWER 2

Score 2


Improved upon the accepted answer by creating a TamperMonkey script so that it applies to all websites by default:

// ==UserScript==
// @name         Force font
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Sets the font on all websites to Consolas
// @author       You
// @match        *://*/*
// @icon         https://e7.pngegg.com/pngimages/656/766/png-clipart-computer-terminal-computer-icons-bash-others-miscellaneous-angle.png
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    Array.prototype.forEach.call(document.getElementsByTagName("*"), function(e){e.style.fontFamily ="Consolas"})
})();



ANSWER 3

Score 1


I use Force Font. It doesn't completely work for a lot of Google websites, but it's worth a try as it works for all the other sites I use.




ANSWER 4

Score 1


An TamperMonkey variant with fixed width font for 'pre' and 'code' tags while the rest gets a proportional font

// ==UserScript==
// @name         Force font
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Sets the font on all websites to Consolas
// @author       You
// @match        *://*/*
// @icon         https://e7.pngegg.com/pngimages/656/766/png-clipart-computer-terminal-computer-icons-bash-others-miscellaneous-angle.png
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    Array.prototype.forEach.call(
        document.getElementsByTagName("*"),
        function(e){
            if (e.parentNode && (e.parentNode.tagName === "PRE" || 
                                 e.parentNode.tagName === "CODE")) {
                return
            }
            if (e.tagName === "PRE" || e.tagName === "CODE") {
                e.style.fontFamily = 'Go Mono'
            } else {
                e.style.fontFamily = 'Go Medium'
            }
        })
})();