Autozoom Extension for Firefox®

Autozoom is an extension for Firefox 1.5.0.x that replaces the menu item View→Text Size→Normal with an item called Autozoom. When the item is selected, the current document is analyzed for the dominant font size and the view is zoomed by the factor that makes the dominant size match your font size preference. If the zoom is already at that factor, the factor is reset to 100% instead.

Download

This extension is a backport of the code I wrote for bug 31961. For performance reasons, the extension contains a native library written in C++. The XPI below is known to work on Mac OS X on both PowerPC and Intel. (The XPI contains libraries for Linux on x86 and x86_64 as well, but those don’t seem to work. Please let me know if you figure out what is wrong.)

Licensing

The Autozoom extension is licensed under the MPL 1.1 / GPL 2 / LGPL 2.1 tri-license.

Build Instructions

Make sure you are building with shared as opposed to static and have the following line in your .mozconfig:
ac_add_options --enable-extensions=default,autozoom

Then:
wget http://ftp.mozilla.org/pub/firefox/releases/1.5.0.6/source/firefox-1.5.0.6-source.tar.bz2
tar jxvf firefox-1.5.0.6-source.tar.bz2
wget http://hsivonen.iki.fi/autozoom/autozoom-src.tar.bz2
tar jxvf autozoom-src.tar.bz2
cd mozilla/
./configure
make

FAQ

Does this make the zoom behave as in Opera?

No, it does not. The extension is a front end for Gecko’s existing zoom. The extension merely picks the factor for the existing zoom with one command as opposed to the user having to find a suitable zoom level by trial and error.

Wouldn’t you wish it behaved as in Opera, though?

Not necessarily. With my Nokia 770, I wish the zoom of the embedded Presto-based browser worked as in Gecko.

Acknowledgements

This extension has been developed as part of Kesäkoodi 2006. I would like to thank COSS and the funders who made Kesäkoodi possible. I would also like to thank everyone on #developers and #extdev who helped me in figuring out how to package the code as an extension.