LINUXUSER KTools: in KDE

Installing Fonts on KDE ALPHABETALPHABET SOUPSOUP www.sxc.hu A well chosen is the perfect addition to your Linux experience. KDE provides a number of tools that help you cook up a really tasty alphabet soup with very little effort. BY MARCEL HILZINGER

one are the days when you click and use the context menu to save font with . As an alternative, needed a degree in launching a second Konqueror . you might prefer to use the Fontforge Gscience to install new fonts in The easiest way to go is to use True- program instead [1]. Linux. In fact, installing fonts in Linux type fonts, as they comprise a single file. To see a preview of a font, you can became child’s play when KDE went to For Type1 fonts you need to install both either hover the mouse over the font file version 3. the Postscript Font Binary (which is iden- To install fonts in KDE, simply pop up tifiable by the *.pfb file extension) and KTools a Konqueror window by pressing the file with the font metrics information In this we present tools, month [Alt]+[F2] and typing konqueror, then (which is identifiable by the *.afm file by month, which have proven to be type the fonts:/ URL in the location box. extension). Some Type1 fonts have a file especially useful when working under Now copy the fonts from any folder to in Postscript Font Metric format instead KDE, solve a problem which otherwise your Personal directory to make them of the Adobe Font Metric file, but KDE is deliberately ignored, or are just some available to programs (see Figure 1). can’t use this. The workaround is to run of the nicer things in life, which – once There is no need to relaunch the GUI or the pf2afm tool to convert the PFM file discovered – you would not want to do KDE. As an alternative, you can right to an AFM file, before you can install the without.

GLOSSARY Type1: A font technology invented by which has a big impact on the rendering as they will print on paper. Due to tech- Adobe to support high quality PostScript of fonts at resolutions below 300 dpi, nology transfer between Apple and printing fonts. Although the Type1 speci- was proprietary. Adobe did not release Microsoft, this technology was intro- fication was open, neither Apple, nor the information necessary for creating duced into Windows in 1989. Today, IBM, nor Microsoft was capable of creat- high quality Type 1 fonts until 1990. both Truetype and Type1 fonts can be ing high quality Type1 fonts because Truetype: A technology invented by used for both on-screen displays and some of the suporting technology , Apple to display scalable fonts on screen printing.

78 ISSUE 55 JUNE 2005 WWW.LINUX- MAGAZINE.COM KTools: Fonts in KDE LINUXUSER

Figure 1: Installing fonts in Konqueror using drag and drop. Figure 2: Font management in the KDE Control Center. for a few seconds, or select Font Preview. these sources, as many fonts are only It also makes sense to disable fonts None of the KDE tools has a print func- free for your own personal use. that you use only rarely. Disabling a font tion. To discover how you can print out To take the headaches out of manag- hides the font from the applications, a sample with a number of fonts, ing a large collection of fonts, KDE has a which improves the application memory without needing to keep changing the font management tool, which is located footprint and makes it easier to find the font in OpenOffice or Kword, read the in the KDE Control Center below System fonts you are looking for. To disable a “Creating a font catalog” box. administration | Font Installer. When font, select the font you want to disable, you launch the tool, it initially displays and then click on the with the red Font Management all the fonts in the ~/.fonts directory. X. Clicking the red X icon tells the KDE Most distributions have a selection of The left-hand side of the window shows font installer to tag the font as (Dis- about 30 fonts by default. If you happen you the font name, file name, and font abled) and dim the font icon. To re- to have a Windows partition on your size. On the right, there is a font pre- enable a font after it has been disabled, machine, you can add the fonts below view, which you can scale up or down simply select the font and click on the C:\WINDOWS\FONTS\ to your collec- by clicking on the magnifying glass icon. icon with the green check mark. What tion. If you are the hunter and gatherer If you would prefer to see a sample sen- the KDE font installer does to disable a type, you will probably have a large col- tence in various sizes instead of the font is to put a dot at the start of the font lection of fonts and find it increasingly alphabet display, click on the Waterfall filename. Linux will handle a disabled difficult to keep track of the fonts in your icon on the right. If you need special or font file as a hidden file, although the collection. The free-ttf-fonts package in accented characters from other lan- fonts are still there. Suse Linux gives you over 300 fonts. guages, it makes sense to change the Of course, you can also install fonts And there are any number of free fonts sample sentence to reflect this (see in the KDE Control Center font installer up for grabs on the Internet, see the Figure 2). This allows you to see at a module. To install fonts using the Con- Fontfreak site [2], for example. Note the glance if the selected font actually sup- trol Center font installer, click on Add… font licensing if you download from ports the characters you need. and then select the fonts you want to add. The KDE font installer supports Box 1: Creating a Font Catalog major font formats such as Truetype, Opentype, and Type1. At this time of writing, KDE does not page numbers) and table of contents give users the ability to print individual (TOC), you might also like to enable the To install, enable or disable fonts glob- fonts, not to mention a font catalog. Extra offset for binding option. This tells ally for your machine, you will need to However, newer versions of the Scribus the script to use an extra offset to allow click the button on the bottom left of the layout program include a script that you to bind the pages to form a neat ref- screen to switch to Administrator Mode. allows you to create a font catalog. To do erence. And if your printer supports this, This tells KDE to open /usr/share/fonts so, select Script | Scripts for Scribus | you can also select Double side printing. (for Mandrake, Debian and Fedora) or FontSample within Scribus. In the new Now click on OK to tell the script to cre- /usr/X11R6/lib/X11/fonts (for Suse window, select the fonts you want to ate the catalog. Depending on the num- Linux). ■ print out below Available Fonts, and ber of fonts you have selected, and your then click the button with the greater computer’s performance, this process INFO than sign. If you want to print out all may take a few minutes. You can then your fonts, click the button with the two print out the complete catalog or use the [1] Fontforge: http://fontforge. greater than signs instead. Besides the PDF export function to create a high sourceforge.net/ page format A4, (want class PDF with the fonts embedded. [2] Fontfreak: http://www.fontfreak.com

WWW.LINUX- MAGAZINE.COM ISSUE 55 JUNE 2005 79