I find it worthwhile to fight with fonts. Over the years I’ve learned a lot about how Linux handles fonts, and the only constant is change. Within Ubuntu, the developers keep making all these wonderful decisions, sometimes to counter to the upstream Debian developers, and on and on. These days, while the Freetype thing is pretty well whipped, we have this awful boondoggle called FontConfig and I wish it were possible to physically confront the folks who created this overly complicated mess. As a pacifist I wouldn’t hurt them, but at least they would likely be intimidated (I am big and ugly) and be forced to explain just what in blue blazes a mere user can do to tame their idiocy.
So while they refuse to condescend to inform us mere mortals with simplified instructions, I have poked and prodded and read webpages until falling asleep. You can configure things any way you like to suit your tastes, but you might need to know a few things before you get started.
A great deal is controlled by what is linked between your /etc/fonts/conf.avail
and your /etc/fonts/conf.d
. This where the Debian world has tweaked the basic FontConf for the whole system. These days using the old dpkg-reconfigure fontconfig-config
has been essentially disabled, and you don’t get to make adjustments that way. Fortunately, most of it is not entirely too obscure. More on that later.
First, in Karmic the whole thing is broken. So even if you know how to write your own ~/.fonts.conf
it might not work until you change something in the system files. If you can understand this bug report you might need to try the work-around suggested by YW Sing, which is comment out a portion of the file at /etc/fonts/conf.avail/44-wqy-zenhei.conf
. Using the XML standard notations, simply comment out the bottom half of the file. So here’s what mine looks like:
<edit name="embeddedbitmap"><bool>false</bool></edit>
</match>
<!-- <alias>
<family>serif</family>
<prefer>….
<family>WenQuanYi Zen Hei Mono</family>
</prefer>
</alias> -->
<alias>
<family>WenQuanYi Zen Hei</family>
I’m not able to show indentation properly on this blog, but I wanted to point out the red colored notations I added according to the suggestion in the bug report. Once I saved this and closed the editor, it took immediate effect. Suddenly my personal fonts.conf worked.
I found suggestions by Martin Ankerl perfect for my needs. However, this is 9.10, and things are different. I notice that turning on autohinting fattens the fonts, and I don’t like that at all. So while I duplicated his suggestions for my fonts.conf and Xresources files, I also went into the system settings and changed a few other things, removing some symlinks and adding one.
Here’s the list of what shows up in my /etc/fonts/conf.d/
:
10-antialias.conf
10-hinting.conf
10-hinting-full.conf
10-sub-pixel-rgb.conf
11-lcd-filter-lcdlegacy.conf….
70-yes-bitmaps.conf
Aside from editing that one file noted above, I didn’t change anything else in the other numbered sets. Thus, I removed the autohinting, changed bitmaps from no to yes, and added the lcdlegacy switch. Here’s what it looks like:
<!-- Use lcdlegacy as default for LCD filter -->
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcdlegacy</const>
</edit>
</match>
</fontconfig>
Again, this blog software has a problem with indentation (AKA “leading whitespace”) so simply note I changed what was in the 11-lcd-filter-lcddefault.conf
file and renamed it. By removing and adding symlinks between conf.avail
and conf.d
you get what you want from the options. By the way, I use the MC console file manager for this, since it’s the quickest way. (sudo apt-get install mc)
The result works well on my wide-screen LCD. You should test for your own use the differences between autohinting on and off; whether you have hintnone, hintslight, hintmedium or hintfull; and lcdnone, lcddefault, lcdlight and lcdlegacy. You can learn about other options here.
well done and good idea.
Pingback: Insanity « Igor's Blog
Pingback: RHEL 6.0 Beta2 « Do What's Right
Pingback: Brief Migration Guide to Ubuntu « Do What's Right
Pingback: Taming the Beast: CentOS 6.2 and Inspiron 1525 Laptop « Do What's Right
Pingback: Taming the Beast: CentOS 6.2 and Inspiron 1525 Laptop | Radix Fidem Blog