This chapter explains how the HP X station accesses fonts and explains how you can configure the X station to download fonts using several different access mechanisms.
Topics in this chapter include:
For a font to be available to the X server:
[Server]
configuration screen.
By default, the font path includes only fonts installed with the X
station's software. These are fonts that the X server can
download using the "secure TFTP" access mechanism. To download other fonts,
you need to change the
X server's font path either by editing it on the X station's [Server]
configuration screen or in the remote configuration file.
.snf
and .pcf
format fonts
(in compressed or uncompressed format).
Adding Fonts from Other Sources describes how to convert other types of fonts into a format
the X server can use.
When switched on, the X station searches for fonts on its font path. Later, when specific fonts are requested, the X server knows where they are located and downloads the fonts using the preferred font access mechanism.
For information about changing your default font path, refer to Changing Your Default Font Path.
The X station can use any of three font access mechanisms:
/fonts
using TFTP.
/usr/lib/X11/fonts
,
and can download all fonts more quickly than TFTP.
Topics in this section include:
If font caching is enabled (and this is the default behavior), previously requested fonts are kept in X station memory. If you need to reclaim the memory, you can clear all cached fonts by following these steps:
[F12]
to access the configuration screens.
[Server]
button.
[Free Cached Fonts]
button.
[OK]
.
[Server]
configuration screen, click on the [Font Caching]
button.
Font Caching
variable in the remote configuration file.
The default behavior enables glyph caching for 16-bit fonts only.
GlyphCacheMode
variable in
the remote configuration file. By default, the variable is set to:
GlyphCacheMode = 16
(the terminal enables glyph caching for 16-bit fonts
only).
Other options include:
GlyphCacheMode = 0
(glyph caching is disabled.
The entire font will be rendered
every time it is loaded.)
GlyphCacheMode = 8
(the terminal enables glyph caching for
8-bit and 16-bit
fonts.)
/fonts
/iso_8859.1/75dpi
/fonts
/iso_8859.1/100dpi
/fonts
/hp_roman8/75dpi
/fonts
/misc
/fonts
/Xol
/fonts
/hp_japanese/100dpi
/fonts
/hp_japanese/75dpi
For Sun systems, the Japanese fonts are actually installed; for other systems, only a pointer to the workstation fonts is installed.
misc
or hp_roman8
from the font path as these
directories contain fonts required by the X server and
by many HP clients.
Rather than install the fonts from the X station's software, you may decide to set up the X station 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:
/usr/lib/X11/fonts
/usr/lib/X11/fonts/iso_8859.1
(HP-UX only)
/usr/openwin/lib/X11/fonts
(Sun only)
/usr/dt/config/xfonts/$LANG
(with CDE installed)
Some SCO workstations have fonts that are in an .snf
format that
the X station cannot use.
However, you can compile SCO fonts in .bdf
(bitmap distribution) format
into the .snf
format the X station uses. See Adding Fonts from Other Sources.
To use the workstation's fonts, you need to ensure:
You can set the X server's font path from the host or from the X station's configuration screens:
Remote Config Download
parameter is ON
(check the [Terminal]
configuration screen).
/config/
terminalname.cfg
for each X
station.
Font Path
keywords and edit
the font path to show the new directories.
xset
command. Refer
to the man page for xset
for details.
To set the font path from the configuration screens:
[F12]
to access the
configuration screens.
[Server]
to access the Default Font Path.
[OK]
.
[Reset]
so that your changes take effect.
Whichever method you use, 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 basepath.)
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 X stations can use NFS, you need to have NFS running on the
file server and you need to have your X stations configured into
/etc/exports
.
If NFS was running on your file server when you installed
your X stations, your X stations 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 ENWARE
software installation instructions to learn how to start it.
If you do not want to use NFS, you need to copy the workstation fonts to a directory under the TFTP home directory so that the X station can download these fonts using TFTP. A security feature restricts TFTP to directories under the TFTP home directory.
/etc/inetd.conf.
To use a font from a computer other than the file server, you can add
the access mechanism and the computer's name to the beginning of the font path.
The syntax of the font path is:
/
[access_mechanism]/
[hostname:port]/
path
where:
tftp
or nfs
(the default is the file server access method).
On systems with a font server, you can also specify tcp
.
(Be sure to specify:
tcp
/
[hostname:port]/
path
7000
)
The following paths are valid:
/tftp/25.6.6.1/usr/lib/X11/700X/fonts/misc/ /nfs/hp835-2/opt/hpxt/enware/xthome/fonts/iso_8859.1/75dpi/ //25.6.6.1/usr/lib/X11/fonts/misc/ /nfs//usr/lib/X11/fonts/iso_8859.1/75dpi/ tcp/25.6.6.1:7000
/usr/tftpdir
on HP-UX 9.x systems;
/tftpboot
on SCO and Sun).
For HP-UX 10.x systems: A /usr/tftpdir
no longer exists.
Instead, you can edit the TFTP entry in /etc/inetd.conf
.
Refer to man tftp
for details.
Symbolic links have been set up to allow NFS to access fonts using the same font path as TFTP.
If you have a font server on your network, you can save about 600 KB of X station 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 X station to use a font server, do the following:
[F12]
to access the configuration screens.
[Server]
to access the Server configuration screen.
[Backspace]
key to remove all of the font path entries
except /rom/fonts/default
.
tcp/
hostname:
ipportnumber[/cataloglist]
where:
+
separated list of catalogs (in other words,
font types).
For example:
tcp/25.7.1.15:7000
(You would not normally specify a /cataloglist.)
[OK]
.
Your changes will take effect the next time you reset or reboot your X station.
This section explains how you can use font utilities to add fonts from other sources such as external applications and how you can delete font files and font directories. Topics include:
To install new fonts not already on the workstation or installed from the ENWARE software, follow the steps listed below:
To create a new directory for the fonts:
Unless you use NFS, you must create the font
directory under the TFTP home directory. For example:
mkdir
tftp_home_dir/usr/lib/X11/700X/fonts/app
For security reasons, TFTP is restricted to operating in directories under the TFTP home directory.
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 .snf
extension). For example, you can use courBO10
to specify
the font that has the filename
courBO10.snf
.
Because HP X stations automatically uncompress and convert
the .snf
(server natural format) and
.scf
(compressed server natural format) fonts of most other
X servers, most fonts can be used as they are.
However, if a font is available only in .bdf
(bitmap distribution format)
or SCO's .snf
format,
it must be compiled to an acceptable format for the
X station (.snf
or .pcf
) before the
X server can use it:
.bdf
format, use the
bdftosnf
font utility.
From the directory where the .bdf
font is stored,
enter the appropriate command line:
bdftosnf -t
filename.bdf
> /path/filename.snf
-i
option:
bdftosnf -t -i
filename.bdf >
/path/filename.snf
.snf
format, use snftosnf
.
Go to the directory where the fonts are stored and type:
snftosnf -i e <
fontname.snf
> newfontname.snf
For example:
snftosnf -i e < ibm6x13.snf > xtibm6x13.snf
snftosnf
utility into a file
that is different from the source file.
Otherwise you will destroy the source file and the output file.
This step directs you to create a fonts.dir
file so the X station
can use the new
font directory.
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 X station requires this map to be able to access the font files.
Once you have added fonts to a directory,
you need to 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
basepath/fonts
/app
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:
[Server]
configuration screen.
[OK]
In this step you check that the new fonts have been added by using xlsfonts
as follows:
xlsfonts
fontname
For example: xlsfonts *10x20*
/fonts
/app
font directory.
.bdf
source file is located and type:
bdftosnf new.bdf >
basepath/fonts
/app/new.snf
fonts.dir
file by typing:
mkfontdir
basepath/fonts
/app
app
to the font path by editing the Default Font Path field
on the X station's [Server]
configuration
screen:
/fonts
/app/
xlsfonts new
If you are adding a font not already found on the Sun workstation or installed from the X station's server software, you must ensure that the font is in an acceptable format and has been integrated into the structure of X server font directories.
To convert new fonts, you need to log in as superuser and to have
$OPENWINHOME/bin
and /usr/bin/X11/700X
in your path.
To check your path, use echo $PATH
.
If you need to set your PATH environment variable, do the following:
set path=($path /usr/bin/X11/700X $OPENWINHOME/bin)
PATH=$PATH:/usr/bin/X11/700X:$OPENWINHOME/bin export PATH
If the fonts that you want to add are Sun fonts in .fb
format,
refer to Converting .fb Fonts.
Sun fonts that are in .fb
format must be converted into
.snf
format (server natural format--a format that can be read by the
X station server).
To convert Sun fonts that are in .fb
format:
/usr/bin/X11/700X/admin/fb2snf
script.
fb2snf
takes all 12 point .fb
fonts from
/usr/openwin/lib/fonts
,
converts them to .snf
format, and saves them in the
/usr/lib/X11/700X/fonts/Xol
directory.
The script also creates a fonts.alias and a fonts.dir file.
fb2snf
script and change
the Sun font directory (INDIR), the directory of converted fonts (OUTDIR),
or the font files selected (FILES), by changing the appropriate line
at the beginning of the /usr/bin/X11/700X/admin/fb2snf
script file. The default settings are:
INDIR=/usr/openwin/lib/fonts #Directory of Sun fb fonts OUTDIR=/usr/lib/X11/700X/fonts/Xol #Directory of converted fonts FILES='[a-h]*12' #Selects all 12-point fonts
/usr/bin/X11/700X/admin/fb2snf
The fb2snf
script attempts to derive the font size from the font's
name.
If you experience any problems, edit the statement:
/usr/openwin/bin/convertfont -Sto change the
-S
command line switch to -s
and specify the font size manually.
For example:
/usr/openwin/bin/convertfont -x -s12 -o /tmp/a12butto a12butto.fb /usr/bin/X11/700X/xtbdftosnf -t /tmp/a12butto.bdf > /tmp/a12butto.snf
[Server]
configuration screen and click [OK]
.
Your changes will take effect the next time you reset or reboot your
X station.
If you ever need to delete font files and font directories, keep in mind the following restrictions:
/fonts
/misc
directory.
mkfontdir
program to create a new fonts.dir file.
app
directory and delete old.snf
fonts.dir
file for the app
directory by typing:
mkfontdir
basepath/fonts
/app
Sometimes the substituted font does
not have the same file structure as the requested font, which causes
the keyboard to produce incorrect characters.
Usually a client reports font substitutions in the error log
(either .xsessionlog
or, with TELNET, .x11startlog
).
To determine which fonts exist,
list the fonts.dir files in each font directory.
To list fonts the X server has available, type:
xlsfonts | more
.
If the font you want appears
in the fonts.dir
files,
but not in the output from xlsfonts
,
you should be able to get the
font you want simply by changing the font path
to include the directory that contains the desired fonts.
Refer to Changing Your Default Font Path.
To determine the default font path, look on
the X station's [Server]
configuration
screen. The path listed as the Default Font Path
represents the path that
is used by the X server when it is reset.
If you want your current
font path (the font path that is active now, according to the applications
you use and the fonts they require),
to be the default font path, select
the [Copy Current Path]
button on the [Server]
configuration
screen.
The next time you reset or reboot your X station, the required fonts will automatically be found according to your new default font path.