| |
|
Home
|
| Red Hat Linux 8.0: The Official Red Hat Linux Reference Guide |
|---|
| Prev | Chapter 6. The X Window System | Next |
Fonts Red Hat Linux uses xfs (X Font Server) to provide fonts to
the XFree86 server and the X client applications that connect to
it. While it is possible to not use xfs and place the
paths to font directories in your XF86Config
configuration file,
xfs has several advantages:
It is easier to add and remove fonts, including
editing the font path. The font
path is a collection of paths in the file system where
font files are stored. The xfs service keeps
the font path out of the XFree86 configuration files, making it
easier to edit.
Fonts may be stored on one machine acting as a
networked font server and can be shared among multiple X
servers over the network. A common set of fonts can be
maintained in one place and easily shared between all users.
More types of fonts are supported.
xfs can handle TrueType, Type1, and bitmap fonts.
The XFree86 configuration files know whether to use
xfs or hard coded font paths because of the
FontPath setting in their Files
sections. By default, the FontPath is set to
unix/:7100. This tells the XFree86 server to connect to
port 7100 using an inner-machine communication link. The
xfs server listening on this port will respond
with font information when queried by the XFree86 server.
The xfs service must be running when X is started. If
it is not, you will be returned to a command prompt with an error
similar to failed to set default font path
'unix/:7100'. Check to see if xfs is
running using the ps aux | grep xfs command. By
default, xfs is set to start in runlevels 2, 3, 4,
and 5, covering all runlevels where you would run X. If
xfs is not running on your system, you can start it
as root using the /sbin/service xfs start
command. Use the /usr/sbin/ntsysv,
serviceconf, or /sbin/chkconfig
utilities to force it to start at the correct runlevels. For more on
configuring services for a particular runlevel, refer to the chapter
titled Controlling Access to Services in the
Official Red Hat Linux Customization Guide
xfs Configuration The /etc/rc.d/init.d/xfs script starts the
xfs server. Several options can be configured in
the /etc/X11/fs/config file:
alternate-servers — Sets a list of
alternate font servers to be used if this font server is not
available. A comma must separate every font server in the list.
catalogue — An ordered list of font paths
to use that contain the font files. A comma must follow every font
path before a new font path can be started in the list.
You can use the string :unscaled immediately
after the font path to make the unscaled fonts in that path load
first. Then, you can specify the entire path again, so that other
scaled fonts will also be loaded.
client-limit — Sets the number of clients
this font server will service before refusing to handle any
more. The default is 10.
clone-self — Decides if the font server
will clone a new version of itself when the
client-limit is hit. By default, this option is
on. Set it to off to disable
this feature.
default-point-size — Sets the default point
size for any font that does not specify this value. The value for
this option is set in decipoints. The default of
120 corresponds to 12 point fonts.
default-resolutions — Specifies a list of
resolutions supported by the XFree86 server. Each resolution in
the list must be separated by a comma.
deferglyphs — Tells xfs
whether to defer the loading of glyphs,
which is an image used to visually represent a font. You can
disable this feature (none), enable this feature
for all fonts (all), or turn this this feature on
only for 16-bit fonts (16), which are largely
used with Asian languages.
error-file — Allows you to specify the path
and file name of a locations where xfs errors
can be logged.
no-listen — Tells
xfs not to listen using a particular
protocol. By default, this option is set to tcp
to prevent xfs from listening on TCP ports,
primarily for security reasons. If you plan on using
xfs to serve fonts to networked workstations on
a LAN, you need to remove the tcp from this line.
port — Specifies the TCP port that
xfs will listen on if
no-listen does not exist or is commented out.
use-syslog — Tells
xfs to use the system error log if set to
on.
Adding Fonts When using xfs, adding fonts to your system is
rather straightforward. Use the chkfontpath --list
command to see the font paths currently configured on your system. To
add new fonts in a new directory, follow these instructions as the
root user:
Create a font directory, such as
/usr/share/fonts and place the fonts inside
that directory. Be sure to set the permissions correctly; it is
only necessary that the files can be read, no other permissions
are necessary.
Type the chkfontpath --add
<font-directory-path>
command, where the
<font-directory-path>
is the full path to the directory holding the fonts. This will add
this font path to the xfs configuration file.
 | Note |
|---|
| | You must have a fonts.dir file in your new
font directory for the chkfontpath command to
work correctly. The creation of the
fonts.dir file, as well as any other files
used by xfs with these fonts, is beyond the
scope of this document.
Many font collections available for Linux include these files
for you, it may not be necessary to create them by hand.
|
Restart xfs using the /sbin/service xfs
restart command. You will also need to restart your X
session.
Typing the chkfontpath --list command will
show the new font path. Any fonts you added will be available for
use.
The Red Hat Support website contains more information on this subject,
see:
http://www.redhat.com/support
for additional help documents.
|
|
|
|
|
|
|
|
Disclaimer: For authoritative source or latest update to this
documentation, please refer to http://www.redhat.com/docs/manuals/linux/ |
|
 |
|
|
|
Quotes: To take the difficulties, setback and sorrows of life as a challenge which to overcome makes us stronger rather than unjust punishment which should not happen to us requires faith and courage.
|
|
|
|
|
|
|