[Previous]   [Next]   [Contents]   [Index]   

Working with Fonts

This chapter tells you how to access fonts from various sources.

When you start your Netstation, it searches for fonts on its font path. Later, when a specific font is requested, it is downloaded using the preferred font access mechanism.

Your Netstation can access a font if:

For information about accessing fonts, see:

For information about font problems, see Solving Font-Related Problems.

For information about memory and performance considerations, see Using Font Caching and Glyph Caching.

Using Fonts from HP Netstation Software

By default, the Netstation can use TFTP to download the fonts installed from HP Netstation Software. The following font directories are installed with HP Netstation Software:
Note: Do not remove misc or hp_roman8 from the font path as these directories contain fonts required by HP host-based and local clients.

Using the Workstation's Fonts

Rather than install the fonts from HP Netstation Software, you may decide to set up the Netstation to use fonts already installed on the workstation. By using workstation fonts, you can save a considerable amount of disk space.

Workstation fonts are installed in the following directories:

To use the workstation's fonts:

When you set the font path, generally you will change a path element such as ./fonts/hp_roman8/75dpi/ to ./fonts/iso_8859.1/75dpi/ (the . in ./fonts indicates the path relative to /opt/hpxt/enware2/xthome.)


Note: You can temporarily change the font path by using the xset command. Refer to the man page for xset for details.

Setting the Font Path from the Host

To use remote configuration to set the Netstation's font path:

  1. Make sure that the Remote Config parameter is ON. (This parameter corresponds to the Download on Next Reboot button on the Terminal - Remote Config configuration screen.)

  2. Edit the file /opt/hpxt/enware2/xthome/config
    /terminalname.cfg for each Netstation.

  3. Uncomment the line that has the Font Path keywords and edit the font path to show the new directories. For the FontPath parameter, you cannot use variables such as $(BasePath).

Setting the Font Path from the Configuration Screens

To set the font path from the configuration screens:

  1. Press and hold [F12] to access the configuration screens.

  2. Select [X Server], then [Font Path].

  3. Edit the Default Font Path field. Your changes will take effect the next time the Netstation is booted.

Accessing the Workstation Fonts: NFS and TFTP

If you have access to a font server, use it as the preferred method for accessing the fonts you need.

If you do not have access to a font server, use NFS rather than TFTP if possible. Before your Netstations can use NFS, you need to have NFS running on the file server and you need to have your Netstations configured into /etc/exports.

If NFS was running on your file server when you installed your Netstations, your Netstations were added to /etc/exports automatically and can access the workstation's fonts now. If you do not have NFS installed on your system, refer to the HP Netstation Software installation instructions to learn how to start it.

Using Fonts from a Font Server

If you have a font server on your network, you can save about 600 KB of Netstation memory by setting your font path to use the font server. (A font server ships standard with all HP-UX 9.x and 10.x systems.) For information about setting up the font server itself, refer to the documentation that came with your host machine.

To set up your Netstation to use a font server, do the following:

  1. Press and hold [F12] to access the configuration screens.

  2. Select [X Server], then [Font Path].

  3. Select the lines in the Default Font Path area and use the [Backspace] key to remove all of the font path entries except ./fonts/builtin.

  4. Add a line to access the font server. The syntax is: tcp/hostname:ipportnumber[/cataloglist]

    where:

    For example, on HP-UX systems: tcp/25.7.1.15:7000 (You would not normally specify a /cataloglist.)

Your changes will take effect the next time you reset or reboot your Netstation.


Note: If you are using HP VUE, you may need to set a new HOME session after you have changed the font path to set up for the next login session.

Using Fonts from Other Sources

This section explains how you can use fonts from other sources such as external applications. Topics include:

Adding Fonts

To install new fonts not already on the workstation or installed from HP Netstation Software, follow the steps listed below:

Step 1: Create a New Font Directory

To create a new directory for the fonts:

  1. Make the directory. If this directory is not under the HP Netstation Software installation directory, you must change the TFTP line in inetd.conf.

  2. Add a fonts.alias file.

    Once you have made the font directory, add a fonts.alias file to the new directory. The fonts.alias file must contain the following line:

    "FILE_NAMES_ALIASES"
    
    This line allows files to be called by their filenames (without the .pcf or .snf extension). For example, you can use courBO10 to specify the font that has the filename courBO10.snf.

Step 2: Copy the Fonts to the New Directory

If the fonts are available in .pcf, .scf, or .snf format, copy the files to the new directory. These fonts can be used as they are.

If a font is available only in .bdf format, it must be compiled before you can use it. To do this, you can use a utility such as bdftopcf.

If the /usr/openwin/bin/convertfont program is available on your Sun system, you can use this program to convert a font that is available in a non-standard format to an X11-standard format.

Step 3: Create a fonts.dir File

Each font directory must contain a fonts.dir file. The fonts.dir file lists all of the fonts in the directory in which it is located, and maps the font names used by clients to font files. The Netstation requires this map to be able to access the font files.

Once you have added fonts to a directory, run the mkfontdir program to create a new fonts.dir file. The command syntax is: mkfontdir path. For example, to create a fonts.dir file for the app font directory, type:
mkfontdir /opt/hpxt/enware2/xthome/fonts/app

For SunOS 4.x systems, you may need to enter the following: /opt/hpxt/enware2/bin/mkfontdir

Step 4: Change Your Font Path

In this step you change your font path to include the new font directory. The new font directory must be in the X server's font path. To add a directory to the font path:

  1. Type it into the Default Font Path on the X Server - Font Path configuration screen.

  2. Reset the Netstation so that your changes take effect.

Step 5: Check that the Font Has Been Added

In this step you check that the new fonts have been added by using xlsfonts as follows: xlsfonts fontname For example: xlsfonts *10x20*

Example: Adding a Font to a New Directory

  1. Create the /opt/hpxt/enware2/xthome/fonts/app font directory.

  2. Go to the directory where the .bdf source file is located and type:
    bdftopcf new.bdf > /opt/hpxt/enware2/xthome/fonts/app/new.pcf
    

  3. Create the fonts.dir file by typing:
    mkfontdir /opt/hpxt/enware2/xthome/fonts/app

  4. Add app to the font path by editing the Default Font Path field on the X Server - Font Path configuration screen: /opt/hpxt/enware2/xthome/fonts/app

  5. Select [Reset to Default] on the X Server - Font Path configuration screen.

  6. From a terminal emulator window, check that the font has been added by typing: xlsfonts fontname

Deleting Font Files

If you ever need to delete font files and font directories, keep in mind the following restrictions:

Example: Deleting a Font from a Directory

  1. Go to the app directory and delete old.snf

  2. Update the fonts.dir file for the app directory by typing:
    mkfontdir /opt/hpxt/enware2/xthome/fonts/app
    

Troubleshooting Font Problems

Refer to Solving Font-Related Problems for troubleshooting information.


[Previous]   [Next]   [Contents]   [Index]