plotfont
GNU plotfont
is a simple utility that will produce a character
map for any font available to the GNU plotting utilities graph
,
plot
, pic2plot
, and tek2plot
, and the GNU
libplot
graphics library on which they are based. The map may be
displayed on an X Window System display, or produced in any of
several output formats. The `-T' option is used to specify the
desired output format. Supported output formats include "X", "pnm",
"gif", "ai", "ps", "fig", "pcl", "hpgl", "tek", and "meta" (the
default).
Which fonts are available depends on the choice of display or output format. To get a list of the available fonts, use the `--help-fonts' option. For example,
plotfont -T ps --help-fonts
will list the fonts that are available when producing Postscript output. One of these fonts is "Times-Roman". Doing
plotfont -T ps Times-Roman > map.ps
will produce a character map of the lower half of this font, which consists of printable ASCII characters. The map will be a 12x8 grid, with a character centered in each grid cell. If you include the `-2' option, you will get a map of the upper half of the font.
Most built-in fonts are ISO-Latin-1 fonts, which means that the upper half is arranged according to the ISO-Latin-1 encoding. The "HersheyCyrillic" font is one that is not. If you do
plotfont -T ps -2 HersheyCyrillic > map.ps
you will get a map that illustrates its arrangment, which is called KOI8-R. The KOI8-R arrangement is the standard for Unix and networking applications in the former Soviet Union. So-called dingbats fonts, such as "ZapfDingbats" and "Wingdings", also have an individualistic layout. In most installations of the plotting utilities, the Wingdings font is not available when producing Postscript output. However, it is available when producing output in PCL 5 or HP-GL/2 format. If you do
plotfont -T hpgl Wingdings > map.plt
you will get a Wingdings character map, in HP-GL/2 format, that may be
imported into any application that understands HP-GL/2. Similarly,
plot -T pcl Wingdings
will produce a Wingdings character map in
PCL 5 format, which may be printed on a LaserJet or other PCL 5
device.
In all, more than a hundred fonts are built into the plotting utilities. See section Available text fonts. Actually, if you are using the plotting utilities to display output on an X display, you are not restricted to the built-in fonts. Doing
plotfont -T X --help-fonts
produces a list of the built-in fonts that are available, including both
Hershey and Postscript fonts. But fonts available on your X display
may also be used. The xlsfonts
command will list the fonts
available on your X display, most font names being given in what is
called XLFD format. The plotting utilities refer to X fonts by
shortened versions of their XLFD names. For example, the font
"Utopia-Regular" is available on many X displays. Its XLFD name is
"-adobe-utopia-medium-r-normal--0-0-0-0-p-0-iso8859-1", and its
shortened XLFD name is "utopia-medium-r-normal". If you do
plotfont -T X utopia-medium-r-normal
then a character map for this font will be displayed in a popped-up X window.
When using the `-T X' option, you may also use the `--bitmap-size' option to choose the size of the popped-up window. Modern X displays can scale fonts by different amounts in the horizontal and vertical directions. If, for example, you add `--bitmap-size 600x300' to the above command line, both the character map and the Utopia-Regular font within it will be scaled in this way. If your X display does not support font scaling, a scalable font will be substituted.
Go to the first, previous, next, last section, table of contents.