Font configuration

This is for Linux. (I am using Debian GNU/Linux, but should work on other distros as well.)

The problem originally surfaced1 when I was trying to get Baskerville working on my Debian machine; on an iPad the Baskerville font rendered beautifully—and this was not just because of its greater pixel density.

On the other hand, on Debian, even when I had the correct Baskerville font installed (read: the identical one), I could not get text to display well. Eventually I found an ArchLinux forum thread about font rendering in Firefox. This led me to a post on the Gentoo forums, which had a very good /etc/fonts/local.conf example file. I simply copied, it—after glancing at it; it seemed good—and now Baskerville essentially renders the same as on an iPad. If you search inside the file for “Baskerville” you will find the relevant lines:

<!-- Make these fonts use autohint slight hinting -->
<!-- Makes only horizontal stems align to pixels.  Truer to glyph -->
<match target="font">
    <test name="family"><string>Baskerville</string></test>
    <edit mode="assign" name="autohint"><bool>true</bool></edit>
    <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>

In fact, Baskerville is not the only font to be helped by this: Computer Modern, which till now had only behaved well under LaTeX, now works rather well as well! Even Linux Libertine (which I like very much; I regard it below only Computer Modern and Baskerville) looks much better; the problem I used to have with uneven open- and end-quotes has disappeared.

—I only wonder, why is this not the default on all Linux machines?

Setting default font

Some notes:

  1. Or rather, the problem always existed, but I just didn’t know that it was a problem … .