Prev | Current Page 233 | Next

Chris Tyler

"X Power Tools"

5
10.5 Installing and Removing Fonts 149
A fonts.dir file for nonscalable fonts can be made directly by the mkfontdir program;
simply run it in a directory containing fonts:
# cd /usr/share/X11/fonts/100dpi
# mkfontdir
For scalable fonts, it??™s necessary to run mkfontscale first, which creates the fonts.scale
file. This file can be checked for accuracy and corrected if necessary (since some scalable
font files may not contain sufficient information to build an accurate XLFD
name) before mkfontdir is run:
# cd /usr/share/X11/fonts/
# mkfontscale
# mkfontdir
Adding core fonts is simply a matter of copying the font files to a directory, running
mkfontscale (if required), then running mkfontdir.
If the directory is not already in the font path and you??™re using a font server, adjust
the configuration file /etc/X11/fs/config and restart the font server; otherwise, add to
the font path through the X server configuration file or xset command:
$ xset fp+ /newfontdirectory
Removing fonts is also straightforward: just delete the unwanted fonts and then run
mkfontscale and mkfontdir.
Figure 10-3. xfontsel core font selection program
150
Chapter 11 11
Pango, Xft, Fontconfig, and
Render: Fonts the New Way
11.


Pages:
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245