Font replacement script

This script automatically switches a site's bad/ugly fonts to something you prefer. By default it turns Comic Sans into your default sans-serif font and Papyrus into the default Serif font but, of course, you can add your own.

Instructions for adding your own combinations to the font replacement 'table' can be found inside the script.

If you know of any fonts that consistently render badly in Opera, let me know so i can add them to the default set. 

My first userscript, so please be kind ;-)

Extension

You can also download this script as an extension now, easier to install. To do this, simply download the .oex file below and confirm that you want to install it.

Changelog

27-02-2012

I've overhauled the interface of the extension version. Should be a lot easier to work with now.

17-11-2011

- you can now type the names of the font in any case you like (see Anonymous' and Frenzie's suggestions in the comments)

- some niggles ironed out.

04-09-2011

Extension version has been updated. it is now, finally, possible to add fonts on the extension preferences page. Since it's stil fairly rough around the edges i will not be uploading it to Opera's extension site yet.

Syndicate content

Tested with Opera version(s): 
11.10
Your rating: None Average: 4.2 (6 votes)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks

Very usefull sometimes ;)

Instead of document.all you

Instead of document.all you should use document.getElementsByTagName('*'), see http://simonwillison.net/2003/Aug/11/documentAll/

 

That said, when I saw the title of this script I thought you made something using the new BeforeCSS and AfterCSS events.

Intelligent alien life does exist, otherwise they would have contacted us.

Instead of document.all you

Instead of document.all you should use document.getElementsByTagName('*')

Good point, now changed.

Um

Please compile into a proper extension and put on this site: https://addons.opera.com/addons/extensions/

This addon is useless to me unless I can access preferences/options to choose which fonts get modified. I know you've stated this already but if you could include that functionality in a future update this could become a popular addon.

Unfortunately i do not, right

Unfortunately i do not, right now, have the time to make updates to script or extension. 

Exactly What I Needed!

Not sure why this isn't simply a part of Opera's options.   

Lower case

Great script. Here's a suggestion: in your comparisons, you should use something like fontFamily.toLowerCase().

That way, the user won't have to enter a million redundant entries such as "Verdana", "verdana", "Arial", "arial", etc.

Of course, this requires the user to use all-lowercase in the list entries.

Good suggestion. However, as

Good suggestion. However, as long as you also use toLowerCase() on what the user entered, there's certainly no need for the user to do any such thing. ;)

Intelligent alien life does exist, otherwise they would have contacted us.

Both good ideas, i'll add

Both good ideas, i'll add that in when i have some spare time.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

By submitting this form, you accept the Mollom privacy policy.