NCD X terminal mini HOWTO: Fonts and the X terminal

Next Previous Contents

## 6. Fonts and the X terminal

The X terminal comes with a small set of fonts. In the X terminal setup menus and configuration files, these fonts are referred to as 'built-ins'. The terminal can be operated with these fonts alone but more fonts are desirable. Fonts can be added by specifying font paths in X terminal console setup menus, configuration files or by using the xset command.

Once the X server software is running on the X terminal, the font path can modified or queried with the command xset.

To query the X server:

    xset -q

To add a font entry:

    xset +fp <path>

To remove a font entry:

    xset -fp <path>

## 6.1 The font server

The font server (xfs) runs on a network host and retrieves fonts for the X terminal and other network clients. Use of the font server allows the use of a wide variety of fonts as the X server software is otherwise restricted to bitmap fonts. During retrieval, the font server can uncompress, scale and convert fonts for the X server and can help simplify the management of fonts for groups of terminals and network clients. Font server software is part of many Linux distributions and has been incorporated into X consortium software available from ftp.x.org.

To indicate the use of a font server, a tcp service entry is used instead of a font path in the X terminal's host resident configuration file or console setup menu.

Format of tcp service entry:

    tcp/<IP address of font server>:<port used by font server>

Example:

    tcp/10.0.0.1:7100

An example of an entry in the X terminal configuration file found on the boot host:

    xserver-default-font-path = {
            { "tcp/10.0.0.1:7100" }
            { "built-ins" }
    }

The xset command with the tcp service entry can used to add the font server to the path:

    xset +fp tcp/10.0.0.1:7100

WARNING: Certain versions of NCDware require the font server entry to be listed first before X terminal 'built-in' fonts. This is contrary to the NCD documentation "System Administrator's Guide for UNIX Systems". Experiment with the order of the font path and verify it with the 'xset q' command.

On the font server host, the server is started at boot time from the rc.local startup script. The font server (xfs) is started with the following command:

    xfs -config <config file path> -port <font server port number>

The standard font server port is 7100.

Example:

    xfs -config /usr/X11/lib/X11/fs/config -port 7100

Example font server configuration file:

       # font server configuration file

       # allow a max of 10 clients to connect to this font server
       client-limit = 10

       # when a font server reaches its client limit, start up a new one
       clone-self = on

       # use the UNIX syslog utility to log errors.
       use-syslog = on

       # list of font directories
       catalogue = /usr/X11R6/lib/X11/fonts/misc/,
          /usr/X11R6/lib/X11/fonts/Speedo/,
          /usr/X11R6/lib/X11/fonts/Type1/,
          /usr/X11R6/lib/X11/fonts/75dpi/,
          /usr/X11R6/lib/X11/fonts/100dpi/

       # file used to log errors if syslog is not used.
       error-file = /usr/X11R6/lib/X11/fs/fs-errors

       # 12 point in decipoints
       default-point-size = 120

       # 100 x 100 and 75 x 75
       default-resolutions = 75,75,100,100

Next Previous Contents