OpenWindows Advanced User's Guide

10.4 Customizing OpenWindows Fonts

If you choose, you can customize the size and style of the fonts displayed in your OpenWindows applications. The following sections describe how to customize these fonts.

10.4.1 Specifying the Font Style and Point Size

The default font for windows is Lucida Sans in 12 point (medium); the default font for window headers is Lucida Sans Bold. If you prefer, you can specify another font style and size for windows and window headers. You can make the change for a single window or you can make a permanent change for all your applications with Workspace Properties. The following subsections describe each of these options.

10.4.1.1 Fixed-Width and Proportionally-Spaced Fonts

Note that there are two general categories of fonts--fixed-width and proportionally-spaced. Each character in a fixed-width font takes up the same amount of space as every other character. By contrast, the characters in a proportionally-spaced font require varying amounts of space, depending upon their individual width. Proportionally-spaced fonts are more pleasing to the eye. However, some applications (such as Command Tool, Shell Tool, and xterm, a popular terminal emulator application) work best with fixed-width fonts.

10.4.1.2 Choosing Between Fixed and Proportional Fonts

Note that the default font displayed in Command Tool and Shell Tool is a proportionally-spaced font. Although this font is pleasing to the eye, problems occur in character alignment (when spacing and tabbing) with any proportionally-spaced font in terminal windows. If the spacing and tabbing character alignment are a problem for you, it is best to choose a fixed-width font for these windows. In the examples that follow, only fixed-width fonts are used for terminal windows; the examples for other windows and headers use proportionally-spaced fonts.

10.4.1.3 Specifying the Font for a Single Window

This section describes how to open a single application with a modified font style and point size. Note that changes cannot be made to existing windows; you must start a new application to display the new font. To start a new application, you type its application name on a command line.

The basic command, shown below, specifies the application name, the -fn (font name) option, and the font style and size. The ampersand (&) returns your system prompt to the window after you type the command; this enables you to continue using that window.

$ application -fn fontstyle-pointsize &

The following are examples of how to use the command to open an application with a specified font style and size.

Use the -fn option with any application and any font style and size you choose. "10.4.2.1 The Available Font List"describes how to list all the fonts available for OpenWindows applications.

10.4.1.4 Making Font Assignments Permanent

If you find that you are repeatedly running applications with customized fonts, you might like to add the customization to your workspace menu. You can do this using the Programs Menu category of Workspace Properties. This will save you the effort of typing the command-line options every time. For example, if you often want to run the text editor with a larger point size, you could add the following command line to the programs menu:

textedit -fn lucidasans-typewriter-14

You can have more than one instance of the same application in your programs menu if you want them to have different font sizes. This is useful if you run an application at a variety of different point sizes. For instance, you may want to have the option of running a text editor using 12, 14, or 18 point fonts. You would add the following commands to your programs menu:

textedit -fn lucidasans-typewriter-12
textedit -fn lucidasans-typewriter-14
textedit -fn lucidasans-typewriter-18

Once you have customized your programs menu from Workspace Properties in this way, you can invoke the text editor at any of these point sizes simply by selecting the appropriate item from your programs menu.


Note -

Command lines added to the programs menu should not be followed by an ampersand (&).


10.4.2 Listing the Available Fonts

You may want to experiment with more fonts than have been shown in the previous examples, and you may want to apply them to other OpenWindows applications. To do this you first list the available fonts and then select them.

10.4.2.1 The Available Font List

You can see the entire list of available fonts by entering xlsfonts at the prompt in a terminal emulator window. It is best to use Command Tool to display the list because it is likely that the list will scroll off the top of the screen, and Command Tool has a scrollbar that will let you view the entire list.


Note -

The list generated from xlsfonts is very long; there are over 400 fonts available. If the listing on your screen does not contain the expected number of fonts, check with your system administrator. It is possible that a subset of the available fonts was installed.


Each font has a long name in addition to a shortened version. The full name for lucidasans-typewriter, for instance, is:

-b&h-lucida sans typewriter-medium-r-normal-sans-12-120-72-72-m-
0-iso8859-1

The fonts you see in the xlsfonts listing are the long names followed by their short names. For the purposes described in this chapter, just use the short names.

Once you have chosen a font, follow the instructions in "10.4.1 Specifying the Font Style and Point Size"to customize the fonts in your application windows.