Using wildcards
Wildcard characters can be used to shorten the string
needed to specify a font.
The asterisk (*) and question mark (?) serve as wildcard
characters in much the same way they do for the operating
system: an asterisk represents any combination or variety
of characters and a question mark represents any single character.
To prevent the shell
from interpreting the wildcards, either enclose the entire font name
in quotes or use a backslash before each wildcard character.
For example, the two following lines are valid wildcard representations of
the font discussed in the previous section. In this example, the font
is being specified for the scoterm client using the
-fn command line option.
scoterm -fn '*courier-bold-o-*-100*' &
scoterm -fn \*courier-bold-o-\*-100\* &
You should be aware of the following when using wildcards in
font specifications:
-
Font specifications using wildcards
should explicitly name enough parts of
the font's full name to create an unambiguous reference. Wildcarded
font specifications usually specify the font family, weight, slant,
and point size.
-
If the wildcarded font specification is ambiguous (in other words,
more than one font matches the specification), the X server chooses
which font to use. If fonts from more than one font directory match
the wildcarded name, the server chooses a font from the directory that
occurs first in the font path. In other words, fonts defined in the
75dpi directory are chosen rather than fonts in the
100dpi directory.
-
It is better to match the point size field (which is measured in
tenths of a point) than the pixel field. This allows your wildcarded
font name to work properly with monitors of different resolutions,
because the wildcarded font name matches either the 75dpi
or 100dpi font set.
Using font wildcards is a convenient method of specifying fonts.
However, it can also lead to unexpected results, so it is
recommended that you test your
shortcut thoroughly before making it generally available.
In many cases, font aliases, described in the next section,
provide a safer and easier way
to shorten your references to full font names.
Next topic:
Font aliases
Previous topic:
Font names
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003