Using OpenOffice.org’s spadmin as an advanced font manager

152

Author: Bruce Byfield

One of the few remaining gaps in basic desktop functionality in GNU/Linux is the dynamic loading and unloading of fonts, especially in groups. If you’re working in OpenOffice.org (OOo), StarOffice Printer Administrator (spadmin) offers a partial solution to the problem.

Now that designers tend to work on machines with more than 1GB RAM, dynamic font swapping is less of a problem than it was when a top-end computer had 32MB. Still, the problem remains. Many designers have tens of thousands of fonts, and loading them all into the X Window System makes for unacceptably high overhead. Nobody would care to scroll through thousands of single-line entries in a combo box, even if a history of recently used fonts were available. Designers need a convenient way to load the handful of fonts they actually need for a project, then unload the fonts when they no longer need them.

In the last few years, developers have made several attempts to provide this functionality, but none of the projects has gotten very far. The Font Manager project is at version 0.0.1 and currently useful only as a font viewer. Similarly, the latest version of the Choosefont font selector is 0.3, which was released in January 2004. Hamster Font Manager did reach version 1.02, but it seems to have been abandoned and needs rewriting, because at least one of the libraries it depends on has been folded into another. All font users are left with is the font installer in the KDE Control Center, which doesn’t load or unload fonts on the fly, or deal with them in groups.

Because spadmin administers fonts independently, it can act as a kludge to provide some of the missing functionality without affecting the desktop as a whole.

As its name implies, spadmin was designed originally to give advanced printer controls to the users of Unix-like systems. If you’re still using lpr or lprng with a PostScript printer, spadmin can help you. However, the predominance of the Common Unix Printing System (CUPS) has made this role more or less obsolete. The exceptions are for auxiliary printers to produce PDF or PostScript files — although both of these functions are now available within OOo itself — or to send a fax.

The ability to use spadmin as a font manager is another legacy from earlier days, when installing fonts on Unix-like systems was an esoteric afterthought. Even if the entire desktop couldn’t use the fonts installed with spadmin, OOo programs could.

If you installed OOo from the RPM packages on the project site, you’ll find spadmin in /opt/openoffice.orgversion//program. However, if you’re using a version of OOo customized for a distribution, it may be elsewhere. For instance, in Debian, spadmin is in /usr/lib/openoffice/program. In Ubuntu, it’s in /usr/lib/openoffice2/program.

Using spadmin for advanced font management is simple. You probably have some basic system fonts installed, but when you want other fonts for a project, follow these steps:

  1. Select the fonts for your current project using the built-in font viewers in Konqueror or Nautilus. You can use either PostScript Type 1 or TrueType fonts.
  2. Create a separate folder for the project’s fonts. Naming the folder after the project will help you find it again.
  3. Use the command ln -s fontpath project_folder to create soft links from the font files to the project directory. By using soft links, you minimize the hard drive space used and avoid the possibility of deleting font files accidentally.
  4. Run spadmin and install the fonts using the Fonts button. You can run spadmin from a user account so that other OOo users don’t need to see your fonts and won’t delete them accidentally.

If you’ve already followed these steps for another project, you may want to delete the fonts installed for it; deleting fonts from spadmin doesn’t affect the font files themselves. You can then open OOo and start work on your latest project. Meanwhile, your system as a whole is uncluttered by fonts that you rarely use.

Admittedly, using spadmin in this way is less than ideal. To use any fonts added via spadmin, you must restart OOo, so fonts are not quite managed dynamically. However, spadmin doesn’t require system administration as the root user, and it also eliminates the overhead of installing all fonts directly to the X Window System. In addition, the utility is useful only for OOo, and while both Writer and Draw have more power than many casual observers imagine, neither is likely to be a designer’s first choice of tools. Still, until something better comes along, using spadmin as a font manager is considerably better than nothing.

Bruce Byfield is a course designer and instructor, and a computer journalist who writes regularly for NewsForge, Linux.com, and IT Manager’s Journal.