GreaseMonkey extension: Text-size defaulter

TorgoX on 2005-12-31T11:13:26

Dear All,

Six months ago, I wrote a GreaseMonkey extension: Text Size Defaulter.

It's meant for use on web sites with insanely small type, as often happens when WEB DESIGN GURUS set their pages' text sizes to "font-size: 10px", which happens to look good for them with their monitors and monitor resolutions (and their designerly disinterest in actual content), but look like tiny little squiggles to me and my particular screen/cornea/retina geometry. However, that user-script would work when the text-sizes were set in actual style sheets, but would fail when it was set in style="..." attributes, and a few other circumstances besides -- this was because it worked only by simple CSS rule injection.

But now I've rewritten it! Now it actually traverses the whole doctree and absolutely enforces a single text size (the browser's default size, in fact) on every single node in the tree, dammit.

There's still a circumstance where it doesn't work: when text is added to the page after it's initially finished rendering. In my experience, however, such things happen only with DOM-generated menu items, where I don't entirely mind the text being too small.

By a stroke of irony, the new version of Firefox has solution to much of my problem-space, in the form of the "minimum font size" setting under Preferences: Content: Fonts & Colors: Advanced, (a.k.a. "font.minimum-size.x-western" in about:config). This defaults to None, but you can merrily set it to me a bit smaller than the normal font size.

However, there's two cases that my plugin catches: 1) situations where you want the font-size restriction to be site-specific (whereas the Preferences thing is global), and 2) situations where the problem isn't overly-small text, but overly-large (whereas there's no maximum font size prefs).

Enjoy!


galeon rules

mary.poppins on 2005-12-31T22:13:23

Galeon has had the "minimum font size" setting available since roughly the beginning of time.

Too bad the developers have discontinued Galeon.

Re:galeon rules

TorgoX on 2006-01-01T02:41:05

Mmmm interesting. Are there other features in Galeon that you wish Firefox had?

Re:galeon rules

mary.poppins on 2006-01-01T06:23:55

Conveniently hung off the "Settings" menu are:
    * load images
        * always
        * from current server only
        * never
    * use own fonts
    * use own colors
    * allow java
    * allow javascript

Firefox has this built-in

revdiablo on 2006-01-03T02:59:23

In the advanced font settings, there is a minimum size setting. It's been there for quite a while...

Re:Firefox has this built-in

TorgoX on 2006-01-03T07:21:04

That's what I said in my entry. Reading is fundamental!