Thursday, March 18, 2010

Better Font Viewing for Firefox, Gtk, KDE, Linux

The best font-viewing experience occurs when the patented (by Apple) Bytecode Interpreter is enabled. Due to licensing restrictions until May 2010, it's not possible for many distros to ship it enabled, but it is perfectly permissible for you as an individual to enable it and use it. Since May 2010, distros have been enabling it by default

Better fonts also help. Install the webcore fonts from here which include the Tahoma and Veranda fonts that were specifically designed to look good in browsers.

There are FireFox tweaks that help it look better by changing these values in about:config, or by directly editing your prefs.js file .

For better rendering of fonts:
user_pref("font.FreeType2.autohinted", true);  
user_pref("font.FreeType2.enable", true);  
user_pref("font.FreeType2.printing", true);  
user_pref("font.FreeType2.unhinted", true);
user_pref("layout.css.dpi", 96);

To see prettier graphics:
user_pref("gfx.color_management.enabled ", true); user_pref("gfx.color_management.mode", 1); user_pref("gfx.color_management.rendering_intent", 3); user_pref("gfx.use_text_smoothing_setting", true); user_pref("svg.smil.enabled", true);

And just to make it go faster:
user_pref("browser.safebrowsing.enabled", false); user_pref("browser.safebrowsing.malware.enabled", false); user_pref("", 0);

I've also experienced excellent results re-compiling FireFox and Xulrunner optimized for i686 and eliminating the debugging code, disabled pango and stripping the binaries. The render test went from a value of 9 to 34 after the changes. You can also disable pango without a re-compile by adding export MOZ_DISABLE_PANGO=1
to your ~/bash_profile.

There's a problem with the SQL databases that FireFox uses becoming bloated and inefficient. Create the following file and put it ~/bin to run periodically.

# from

for i in `find ~/.mozilla -name \*.sqlite`; do sqlite3 $i vacuum; done

for i in `find ~/.mozilla -name \*.sqlite`; do sqlite3 $i reindex; done

If you are a GNOME user, there's good font enhancement info at HOWTOForge. The lxappearance app seems to be a little-know lightweight tool to set the look of GTK apps; it's part of the Lightweight X desktop Environment.


Optimal Use of Fonts on Linux

Font Hinting Enabled

No comments: