DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Changing fonts

Specifying fonts for the entire system

System-wide font resources are specified on a client basis, in the system-wide resource files. If you want to make font resource changes that affect an application every time it is run on your system, you must make your font changes in these files.

You must be logged into the system as root to perform this task.

To make a font resource change or addition in the resource database, perform the following steps.

  1. Open the desired client resource file for editing:

  2. Make the desired font resource specification(s): When you are finished, save your changes and exit the resource file.

  3. If users are running clients that are affected by the new configuration at the time you make these changes, they must restart the clients to see the new fonts. In some cases, users may need to restart the X server itself to see the new fonts.

Step 1: Editing the client resource files

Default resources for clients are stored in files in two locations on the system: /usr/lib/X11/sco/startup and /usr/lib/X11/app-defaults. These directories contain several files, each named for the specific client they represent. The resource specifications defined in these files control the appearance and behavior of their specific client.

The files in /usr/lib/X11/sco/startup contain server-specific resources. The values of these resources are loaded into the resource database and stored in the X server by the xrdb client when a Graphical Environment session is first started. These resource specifications are available for all clients that you run, regardless of the actual host that is running the applications.

The files in /usr/lib/X11/app-defaults contain the majority of resource specifications for the clients on your system. The resources in these files are host-specific and only affect clients that are run on your machine. These resource files are read by the resource manager when the corresponding client is run.

If you want to configure a client to use a particular font, regardless of the machine on which the client is run, you should edit the client's resource file in /usr/lib/X11/sco/startup. This approach has advantages and disadvantages: a client generally executes more quickly if its resources are already recognized by the X server, however, there is no guarantee that fonts that exist on your system are available to remote clients on their host machine. If you run remote clients, it is recommended that you set font resources in host-specific resource files.

If you want to configure a client to use a particular font only when it is run on the local system, edit the appropriate client file in /usr/lib/X11/app-defaults.

If you intend to modify any of the files discussed here, it is recommended that you either make a backup copy of the file before you enter your resource changes, or comment out old resource values, using the ``!'' comment character, before entering new ones. This way you are assured of regaining the default values, if needed.

See also:

Step 2: Setting the font resource

As with all resources, font resource specifications must use the correct format:

client*resource_name: fontname

client refers to the client you want to affect. You can supply either the client's binary or class name. resource_name is the actual resource variable you want to define. You can use either the resource's class or instance name. fontname is the actual name of the font you are selecting. You can use the full font name, font name wildcards, or a font alias when setting this value.

There are two resources from which you can choose when specifying fonts:


fontList (Class: FontList)
This resource specifies the font that is used to display text. Most clients accept this resource. This resource can also be used to specify lists of fonts, to accommodate the possibility that some systems may contain a set of fonts, while other systems contain a different set. If you list multiple fonts, they must be separated by white space.

font (Class: Font)
Generally, this resource specifies the font that is used for all Desktop icon labels. Other clients may also use this resource, however fontList is used more frequently.

Whether you are replacing the font of a currently defined resource or you are adding a new, perhaps more specific, resource, the resource line should use the same format. For example, if you want to change the default font for the scocolor client so it displays larger text, the resource line would read:
   ScoColor*fontList: -adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso8859-1

See also:

Step 3: Activating the new fonts

Once you have made the desired font change to the client resource file or files, the new specifications are immediately available to all users. However, if users were running the affected clients while you set the new font values, they need to restart the client to see the new fonts.

If you made font specifications in any of the server-specific resource files, users will have to restart the X server before they see the new fonts.


Next topic: Specifying fonts for individual users
Previous topic: Specifying fonts

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003