Getting nice looking TrueType fonts on Fedora Core
Some TrueType fonts look significantly worse on some Linux distributions than on Microsoft Windows or MacOS. This is due to the usual reason that things suck on Linux: patents. TrueType fonts can have special hints for looking good at low resolution, but using those hints is apparently covered by some Apple patents in (some) countries with software patents.
(For the gory details, see here.)
Pretty much everyone on Linux uses the FreeType library to render TrueType fonts. FreeType has implementations of the patented stuff, but Fedora Core (and I believe some other Linux distributions) build the system FreeType libraries with it disabled due to the patent issues.
So to get nice looking TrueType fonts, all you need to do is rebuild the FreeType RPMs with the patented bytecode interpreter enabled, like so:
- set up a sane RPM build environment.
- get the FreeType source RPM and unpack it.
- find the line near the start of
freetype.specthat says '
%define without_bytecode_interpreter 1.' Change the 1 to a 0.
- change the
Releasefield to mark your change; I usually add '
.cks.0' or the like to it.
- optionally, add an entry at the top of the
%changelogsection about this.
rpmbuild -bb freetype.spec
(you may need to install some -devel RPMs that it needs)
- update to your new FreeType RPM with '
rpm -U' or the like.
- restart the X font server so that it's using the new FreeType shared
library: quit X, then do
/etc/rc.d/init.d/xfs restart, then restart X.
On an x86_64 machine, you probably want to rebuild both the native 64-bit RPM and the i386 version (and now you know why I was looking into cross-build RPMs yesterday). Rebuilding only the 64-bit RPM will leave any 32-bit programs that directly use FreeType with bad-looking TrueType fonts; this includes OpenOffice, ImageMagick, and a 32-bit Firefox (if you've installed one in order to get Flash et al working).
A spectacular web spammer failure
In the spirit of earlier heroic failures, I just
saw someone attempt to put an entire
POST form in the actual HTTP
request. No, really. The incoming request looked something like this:
login=%5Burl%3Dhttp%3A%2F%2Fwww.nextlevelnews.com%2F [.. elided ..] %2F70.html%0D%0A+&view=login&page=blog%2Flinks%2FBestToolPOST /~cks/space/.login HTTP/1.1
This is perhaps the most abject spammer failure I've seen.
(It also confirms that web spammers are targeting my login form as well as the 'post a new comment' form; I have a theory on that, which doesn't fit in this margin.)
Unsurprisingly, the request came from a charter.com cablemodem that
is currently in
bl.spamcop.net and the CBL, among other places.