Pages

July 14, 2010

Fixing OpenOffice.org font rendering in Debian Squeeze

I guess I'm on a roll with font rendering improvements...

After patching libcario2 in Squeeze, I noticed font rendering in OpenOffice.org was really awful. It may have been equally awful before and I never noticed. In any case, it's now something that needs attention.

Ugly fonts in OO.org have been reported under Ubuntu and other distributions as well. A good explanation of the problem (in Ubuntu, at least) and a workable solution is offered by Mike Kasic about halfway down the bug report at https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/271283. I tried his suggestions on my Squeeze installation, and it worked. If you don't want to be bothered filtering through the bug report, here's the executive summary.

Fixing just the session
Open a terminal and do:
echo "Xft.lcdfilter: lcddefault" | xrdb -merge

Making the fix persist across sessions
echo "Xft.lcdfilter: lcddefault" >> ~/.Xresources

Apply the fix for all users all the time
As root:
# sudo sh -c 'echo "Xft.lcdfilter: lcddefault" > /etc/X11/Xresources/lcd-filter-lcddefault'

Note: I have only tried the first two above. I have not tested applying the change to all users.

The fix also works on my Sabayon Linux 5 install that uses the lcdpatch in cairo.

No comments: