|
|
Mozilla and TrueType fonts on FreeBSDI decided to change the window manager on my FreeBSD laptop from WindowMaker to fluxbox (bear with me here, it is kind of relevant). To install, I tried the usual ports method:
# cd /usr/ports/x11-wm/fluxbox
# make
However, the make process died trying to build one of the fluxbox dependencies, freetype. It seems that XFree86 4.3 is required to support the latest version of freetype, so that necessitated a rather larger port upgrade than I had anticipated. I decided to try the portupgrade method, as described in the OnLamp article. First, portupgrade must be installed. This has a number of dependencies, including ruby, so the installation is not a quick process. Then, you must run portsdb -Uu to create a database (note that this must be re-run after updating the ports tree via cvsup). The portupgrade process can then be invoked - the flags shown ensure that all dependencies on all package are also upgraded:
portupgrade -arR
I let this run overnight, although luckily I checked later in the evening, because one port required the user to hit return. That would have been annoying to find waiting in the morning. Despite my forebodings that the upgrade would fail mysteriously, everything looked fine the next morning. Pretty impressive. After all that, I finally had fluxbox working. I did notice that the /usr partition was significantly fuller than before, so I ran a couple of utilities to clean up the ports:
portsclean -DD # remove unused and out-of-date distfiles
portsclean -C # clean up any work areas in the ports tree
You can read more about managing the ports tree space in this other OnLamp article. I discovered that I now had Mozilla 1.6b (development version), which meant it should now support TrueType fonts. There are a lot of articles on the web on how to get Mozilla to support TrueType fonts, but despite following the instructions to the letter, I could not get Mozilla to display the TrueType fonts in its font selection list. This was made more galling because I had TrueType working quite happily with Mozilla on my Debian box. To recap, this is what you need to do to get Mozilla working with TrueType (paraphrased from the web site):
So I followed this recipe, but I could not get TrueType fonts. Naturally, I should have read the FreeBSD handbook X Font section a little more carefully, since the answer was there. Font directories have to be made known to the FreeType library by adding a line to the local.conf file, located in the directory /usr/X11R6/etc/fonts under FreeBSD. The line has to be of the form: <dir>/pathname/of/font/directory</dir>. As you may surmise, the local.conf file is in XML format. The font cache has to be re-created with the newly added fonts, using the command fc-cache -f. Following this step, I could finally see the TrueType fonts displayed in the Mozilla font list.
|