DEV Community

Katz Ueno
Katz Ueno

Posted on

How to disable web fonts

This is the quick tip to be able to disable all CSS fonts

We had a website which contains a lot of line separator (U+2028) character.

How to install

  1. Make a bookmark on bookmark bar (just add anything as dummy)
    • "Bookmark bar" is the bar that you see the list of icon right below the address bar
  2. Edit the newly created bookmark, replace the URL to the following javascript code & rename it to whatever you like
  3. Done

Javascript

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

How to use

  • Visit a page
  • Click the bookmark icon that you just made

Why need this

If you are using modern web font, they treat line separator as space.

However, we had a client whose customers maybe using older computer. They were viewing the page without web font. Then line separator are showing up as corrupted square letters.

We need to remove those characters, but it's hard to locate unless we disable web font.

Thank you user10089632 of StackExchange!
https://superuser.com/questions/1209191/force-chrome-to-use-my-preferred-font-over-the-authors?newreg=20d74beb36514f629acc2f7222727626

Top comments (1)

Collapse
 
esotataylor profile image
EsotaTaylor

nice, take care

Revenge spell caster