![]() |
![]() |
![]() |
![]() |
Using Fonts
This chapter describes how to set up fonts on the host to support entries added in the remote configuration file and the fonts.tbl file. The network computers use PCF format as standard, but can read SNF, SCF, SNF.Z, PCF, PCF.Z, PCFZ, BDF, DECW$FONT, and many compressed formats.
The font access method is specified in the remote configuration file. The network computer can access fonts via TFTP, NFS, or DAP. Font files tend to be large; they do not have to be installed on the same disk as the boot files. See the NCBridge Reference Manual for details on setting up host file access for fonts.
If you use NFS as the file access method, the fonts can be placed anywhere in the host file system, with NFS directories and exports set accordingly. Use an nfs_table command or add an nfs.tbl entry, and enable NFS access.
Note: With most versions of Unix workstations, we recommend configuring NCBridge to use the fonts provided by the Unix vendor. To use secure tftp for loading fonts, the font directories must reside in the secure directory. Secure tftp does not follow symbolic links outside the secure directory. If there is insufficient space within the secure directory for the fonts, you may install them elsewhere and use NFS or a font server to access them. See the topic, Configuring Fonts for the Common Desktop Environment (CDE) for more information about this. When setting font paths, do not use the secure directory name in the path. For example:
- Secure directory: /tekxp
Actual font directory: /tekxp/boot/fonts
Specified font path: /boot/fonts/100dpiRefer to Chapter 1, Installing the Software for more information on secure tftp.
How the X Server Builds the Font Database
At boot time, the X server builds a font database located in the network computer. The steps below explain how this is done.
- The X server searches the primary path for a fonts.tbl file.
If a fonts.tbl file is not found with the primary path, the X server searches the secondary path for a fonts.tbl file. The secondary path is used if the primary path is not specified. Primary and secondary paths are specified in either the remote configuration file or in Setup. If fonts are not found through the primary or secondary paths, the X server searches the boot host and the boot method.
In this example, the primary file path for the configuration files is /tekxp/boot/fonts on the host arizona, accessed with tftp.- When the X server finds a fonts.tbl file, it searches the directories listed in this file for fonts.dir and fonts.alias files. The X server uses the information in the fonts.dir and fonts.alias files to build the font database on the network computer to enable it to find the specific font files. The X server rejects the path unless it finds both fonts.dir and fonts.alias files.
Note: Once the fonts.tbl file is found, the X server ignores file_path_1 and file_path_2 when searching for specific font files.
- The fonts.dir file maps file names to an X logical font descriptive name (XLFD); the fonts.alias file lists alternative names for the XLFD font names. A typical entry for fonts.dir is:
- 5x8.snf -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso8859-1
- Typical entries for fonts.alias are:
- FILE_NAMES_ALIASES
5x8 -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso8859-1
- Resident and . . ./tekxp/boot fonts are always available unless explicitly removed with the xset fp- command. Refer to Table 11-1 for the list of resident fonts.
Resident and Boot Directory Fonts
Resident fonts (Table 11-1) are loaded with the X server and are always available. Boot directory fonts (Table 11-2) are loaded from the installation media into the directory /tekxp/boot and are loaded by default.
Installing Fonts
The installation media provides fonts.dir and fonts.alias files for each font directory listed in Table 11-3. By default, the installation adds the font paths of the fonts in Table 11-3 if you choose to install them. It also searches for fonts on your host and includes any font directories it finds. To include support for additional fonts, you may have to add the names of these font directories to the fonts.tbl file. To install additional PCF, SCF, SNF or other directly supported fonts:
- Make a directory for your font files, for example, myfonts.
- Copy the additional fonts in the myfonts directory.
- If the fonts are compressed (ending in .Z), you can uncompress them for faster reading, or leave them compressed to save disk space. To use uncompress:
- Run mkfontdir to create a fonts.dir file. Enter:
Note: A modified version of /tekxp/src/mkfontdir reads inverted SNF files. You must make the utility before you can use it.
Note: The fonts.alias file must exist, even if it is empty.
- Refer to the mkfontdir man page for more information.
Refer to the next section on configuring the fonts paths in the fonts.tbl file.
Configuring Fonts for the Common Desktop Environment (CDE)
The network computer (NC) family was designed to establish fonts during boot up. Configuring the NC to pick up the correct fonts at boot time or at least the needed fonts is a frequent problem for administrators. Setting up the NC to access the correct font paths is key to providing the same look and feel as a Unix workstation.
Under the CDE now provided by many Unix workstation manufacturers, special fonts are required. These fonts are not included as part of NCBridge, so the configuration of NCBridge products requires the NC to read these fonts from the Unix workstation or server.
Using Font Paths to Provide CDE Fonts
A font path is a directory path which points to directory containing a font.dir, fonts.alias and font files. The font paths are added to the /tekxp/boot/config/fonts.tbl file to identify the fonts to be loaded (accessed) at boot time. During the booting process, the fonts.tbl file is read, then the fonts.dir and fonts.alias files are read from each of the font paths. If the server finds these files, the font path is added and an internal table that maps the font names to the file font file names will be created in memory. If a font server is used, the font server is responsible for providing this table, which contains the list of known fonts. The next topic explains in detail how this works when you are accessing (using) a font server.
The font path output produced by a Sun Solaris V7 workstation in response to the xset command is shown in this example:
/usr/openwin/lib/X11/fonts/F3bitmaps,/usr/openwin/lib/X11/fonts/Type1,/usr/openwin/lib/X11/fonts/Speedo,/usr/openwin/lib/X11/fonts/misc,/usr/openwin/lib/X11/fonts/75dpi,/usr/openwin/lib/X11/fonts/100dpi,
- Place the list of fonts read from the xset command in the /tekxp/boot/config/fonts.tbl file. The list is changed from a comma-separated (",") list to a single font path on each line as follows:
- Configure the NC so it can access the new font paths.
- If booting NFS, you must make additional mounts in the xp.cnf file if fonts are not in the boot path. The following is an example of a line to add to the xp.cnf file to set up an NFS mount for accessing the fonts where lunar is the host containing the fonts:
- If booting TFTP with secure mode enabled, each font directory needs to be copied to the secure directory. By default on most Unix hosts, the font directory is /tftpboot. Change the font paths in the fonts.tbl file to reflect the new path excluding the secure directory.
- Reboot and check local Setup or use xset to verify that fonts are correct on the NC. If they do not work, check the local console window for errors. You can also use the xlsfonts command to list known fonts.
Using a Font Server to Provide CDE Fonts
Another way to set up fonts for an NC is to use a font server instead of individual font paths. To do this, add the font server path to the fonts.tbl file. This usually replaces the font paths, but you can use both a font server path and the font paths. On Sun Solaris V6 and V7, a font server starts by default on port 7100. (See the xfs man page to configure a font server if one does not start by default.)
- Add a "#" character in front of the lines in the fonts.tbl file and replace it with the line below to use the font server on the Solaris host where <IP Address> is the IP Address of the host running a font server.
- Reboot and check local Setup or use xset to verify fonts are correct. If not working check the local console window for errors. Also use the xlsfonts command to list known fonts.
Adding IBM Fonts to fonts.tbl
If you are running IBM AIX 3.2 or later, add the IBM fonts to support SMIT and InfoExplorer.
The primary tools for RS/6000 administration are SMIT (System Management Interface Tool) and InfoExplorer. These have a number of fonts which are not included in the default fonts.tbl file. AIX 3.2 supplies fonts in compressed .snf form. Here is how to get the fonts you need to run aixterm and InfoExplorer:
Table 11-3 lists the font directories in the /tekxp/boot/fonts directory.
Using xset to Add or Delete Font Paths
Use xset to add or delete font paths in the X server font database. The font directory must contain both a fonts.dir and a fonts.alias file. In the following example, the font path /usr/untested_fonts is added to the font database:
- # xset +fp /usr/untested_fonts -display <NC hostname:0.0>
To display the font paths that the X server has found, use Setup (drag on Network Tables and Utilities and release on Font Directory) or use xset:
- # xset -q -display <NC hostname:0.0>
- /usr/untested_fonts
/tekxp/boot/fonts/misc
/tekxp/boot/fonts/100dpi
resident/Adding font paths with the xset command only applies to the current X session. To reset to the default font paths, use the command:
- # xset +fp default -display <NC hostname:0.0>
Converting BDF to PCF
A utility is provided to convert BDF fonts to PCF format. The utility bdftopcf is located in /tekxp/bin/<host>/bdftopcf, where <host> is sun4, solaris, or hp700. This utility is not provided for hp300. For best results, compile the fonts on the host where they are used.
- Copy the BDF files to be converted to a separate directory.
- Change to the new directory.
- Convert the BDF files to PCF files:
- You can remove all of the BDF files in the directory.
- Follow the previous instructions under the heading Installing Fonts, to make the converted fonts available to the network computer.
Converting Sun Fonts
Note: This is for the Sun operating system only. The suntoxfont utility converts Sun fonts to PCF format that the network computer can read directly. This utility can be found in the /tekxp/bin/sun4 directory.
- Use mkdir to create a new directory to contain the converted fonts. For example:
- Use cd to change to the new directory.
- In a separate ASCII file, list each font name to be converted (one font name per line). A sample file, font_list, is located in the /tekxp/bin/sun4 directory. This file contains recommended fonts for conversion.
- Run the suntoxfont utility specifying the file list created in step 3.
- Use xset to add the new directory to the X server font database.
For detailed information about using xset, refer to the section Using xset to Add or Delete Font Paths earlier in this chapter.
Adding Fonts
To add additional fonts to a font directory:
SCF Font Issues
The directory /usr/lib/X11/fonts contains five subdirectories of HP fonts; hp_kana8, hp_roman8/75dpi, iso_8859.1/100dpi and 75dpi, misc, and whatever. Font files in these subdirectories are in compressed SNF format with a file extensions of .scf.
The network computer can read compressed SCF fonts directly by including any of the HP font directories listed above in a fonts.tbl file. Make sure the primary and secondary file access is properly set. Refer to the section How the X Server Builds the Font Database earlier in this chapter for detailed information.
Converting SCF Fonts to SNF Fonts
If you have sufficient disk space available and want to enhance the system performance, use the procedures below to convert the .scf font files to uncompressed SNF files. This is an optional step used to increase system performance only.
The utility uncompress converts these compressed fonts to standard SNF format, readable by the network computer. Use the following procedure to convert a directory of SCF files to SNF format:
- Create the directory /tekxp/boot/fonts/<fontdir>, where <fontdir> corresponds to a directory of compressed files in /usr/lib/X11/fonts.
- Copy the compressed font files into the new directory, and cd to the new directory.
- Rename any font files that are more than 12 characters in length to provide room for the .Z extension. File name length is limited to 14 characters by default.
- Invoke a C Shell (if you are not already running C Shell), and enter the following commands:
- Follow the procedure from the previous section, Installing Fonts on page 11-10 to make the converted fonts available to the network computer.
![]() |
![]() |
![]() |
![]() |