File: plotfont.1

package info (click to toggle)
plotutils 2.6-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 13,184 kB
  • sloc: ansic: 68,670; sh: 20,086; cpp: 12,382; yacc: 2,588; makefile: 838; lex: 137
file content (623 lines) | stat: -rw-r--r-- 18,984 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
.TH PLOTFONT 1 "Jun 2000" "FSF" "GNU Plotting Utilities"
.SH NAME
plotfont \- produce character maps of fonts supported by the plotting utilities
.ig
Not all man macros define SB (and not all whatis parsers stop on .\")
..
.de SB
\&\fB\s-1\&\\$1 \\$2\s0\fR
..
.SH SYNOPSIS
.B plotfont
[
.I options 
]
.I fonts
.SH DESCRIPTION
.LP
.B plotfont
produces a character map for any font that is supported by the plotting
utilities, which include
.BR graph (1),
.BR plot (1),
.BR pic2plot (1),
.BR tek2plot (1),
and the GNU libplot 2-D graphics export library (see
.BR plot (3)).
Which fonts are supported depends on the output format,
which is specified by the 
.BR \-T " option."
A listing of the fonts available in any specified output format may be
obtained with the
.B \-\-help\-fonts
option (see below).
.LP
The character map, or maps, will be written to standard output in the
specified format.
For example, the Times-Roman font is available when producing Postscript
output.
The command
.B plotfont \-T ps Times\-Roman > charmap.ps
will yield a character map of the Times-Roman font, in a Postscript format
that can be viewed or edited with the
.BR idraw (1)
drawing editor.
The Times-Roman font is also available when producing Fig output, which
can be viewed or edited with the 
.BR xfig (1)
drawing editor.
The command
.B plotfont \-T fig Times\-Roman > charmap.fig
will yield the same character map, but in Fig format rather than
in Postscript format.
.LP
As another example, the Univers font is available when producing PCL 5
output.
The command
.B plotfont \-T pcl Univers > charmap.pcl
will produce a character map of the Univers font, in PCL 5 format.
.LP
When producing output for the X Window System, i.e., for a popped-up
window, any scalable X Window System font that has an
XLFD (i.e., X Logical Font Description) name is supported.
For example, the command
.B plotfont \-T X utopia\-medium\-r\-normal
will pop up a window, and draw a character map of the Utopia-Regular font.
"utopia-medium-r-normal" is a truncated version of the Utopia-Regular 
font's XLFD name.
The Utopia-Regular font is available on most X Window System displays.
.SH OPTIONS
.SS General Options
.TP
.BI \-T " type"
.br
.ns
.TP
.BI \-\-output\-format " type"
Select 
.I type
as the output format.
It may be "X", "png", "pnm", "gif", "svg", "ai", "ps", "cgm", "fig",
"pcl", "hpgl", "regis", "tek", or "meta" (the default).
These refer respectively
to the X Window System, 
PNG (Portable Network Graphics) format,
portable anymap format (PBM/PGM/PPM), 
a pseudo-GIF format that
does not use LZW encoding,
the new XML-based Scalable Vector Graphics format,
the format used by Adobe Illustrator, Postscript or
Encapsulated Postscript (EPS) that can be edited with
.BR idraw (1),
CGM format (by default, confirming to the WebCGM profile),
the format used by the 
.BR xfig (1) 
drawing editor, the Hewlett\-Packard PCL 5 printer
language, the Hewlett\-Packard Graphics Language, 
ReGIS graphics format (which can be displayed 
by the
.BR dxterm (1)
terminal emulator or by a VT330 or VT340 terminal),
Tektronix format (which can be displayed by the
.BR xterm (1)
terminal emulator),
and device-independent GNU metafile format itself.
Unless \fItype\fP\^ is "X", an output file is produced and written
to standard output.
.IP ""
Files in PNG, PNM, pseudo-GIF, AI, or Fig format contain only a single page
of graphics.
So if the
.B \-T png
option, the 
.B \-T pnm
option, the 
.B \-T gif
option, the 
.B \-T ai
option, or the 
.B \-T fig
option is used, the output file will contain a character map for only the
first-specified font.
.IP ""
A listing of the fonts available in any specified output format may be
obtained with the
.B \-\-help\-fonts
option (see below).
If a requested font is unavailable, a default font will be substituted.
The default font
is "Helvetica" for "X", "svg", "ai", "ps", "cgm", and "fig",
"Univers" for "pcl",
and "HersheySerif" for "png", "pnm", "gif", "hpgl", "regis", "tek", and "meta".
.TP
.B \-1
.br
.ns
.TP
.B \-\-lower\-half
Generate a character map for the lower half of each specified font.
This is the default.
.TP
.B \-2
.br
.ns
.TP
.B \-\-upper\-half
Generate a character map for the upper half of each specified font.
.TP
.B \-o
.br
.ns
.TP
.B \-\-octal
Number the characters in octal rather than in decimal (the default).
.TP
.B \-x
.br
.ns
.TP
.B \-\-hexadecimal
Number the characters in hexadecimal rather than in decimal (the default).
.TP
.B \-\-box
Surround each character with a box, showing its extent to left and right.
The default is not to do this.
.TP
.BI \-j " row"
.br
.ns
.TP
.BI \-\-jis\-row " row"
Generate a character map for row 
.I row
of a Japanese font arranged according to JIS [Japanese Industrial Standard]
X0208.
The only such font currently available is the HersheyEUC [Extended
Unix Code] font.
If used, this option overrides the 
.B \-1
and 
.B \-2
options.
The valid rows are 1.\|.\|.94.
In the JIS X0208 standard, Roman characters are located in row 3, and
Japanese syllabic characters (Hiragana and Katakana) are located in rows 4
and 5.
Greek and Cyrillic characters are located in rows 6 and 7.
Japanese ideographic characters (Kanji) are located in rows 16.\|.\|.84.
.TP
.BI \-\-bg\-color " name"
Set the color used for the background to be
.IR name .
This is relevant only to 
.BR "plotfont \-T X" ,
.BR "plotfont \-T png" ,
.BR "plotfont \-T pnm" ,
.BR "plotfont \-T gif" ,
.BR "plotfont \-T svg" ,
.BR "plotfont \-T cgm" ,
and
.BR "plotfont \-T regis" .
An unrecognized name sets the color to the default, which is "white".
The environment variable
.SB BG_COLOR
can equally well be used to specify the background color.
.IP ""
If the 
.B \-T png
or
.B \-T gif
option is used, a transparent PNG file
or a transparent pseudo-GIF, respectively, may be produced by
setting the 
.SB TRANSPARENT_COLOR
environment variable to the name of the background color.
If the 
.B \-T svg
or
.B \-T cgm
option is used, an output file without a background may be produced
by setting the background color to "none".
.TP
.BI \-\-bitmap\-size " bitmap_size"
Set the size of the graphics display in which the character map(s) 
will be drawn,
in terms of pixels, to be
.IR bitmap_size .
The default is "570x570".
This is relevant only to 
.BR "plotfont \-T X" , 
.BR "plotfont \-T png" , 
.BR "plotfont \-T pnm" , 
and
.BR "plotfont \-T gif" ,
all of which produce bitmaps.
If you choose a rectangular (non-square) window size, the fonts in the
character map(s) will be scaled anisotropically, i.e., by different factors
in the horizontal and vertical directions.
For
.BR "plotfont \-T X" , 
this requires an X11R6 display.
Any font that cannot be scaled in this way will be replaced by a default
scalable font, such as the vector font "HersheySerif".
.IP ""
The environment variable 
.SB BITMAPSIZE
can equally well be used to specify the window size.
For backward compatibility, the X resource 
.B Xplot.geometry
may be used instead.
.TP
.BI \-\-emulate\-color " option"
If 
.I option
is 
.IR yes ,
replace each color in
the output by an appropriate shade of gray.
This is seldom useful,
except when using 
.B plotfont \-T pcl
to prepare output for a PCL 5 device.
(Many monochrome PCL 5 devices, such as monochrome
LaserJets, do a poor job of emulating color on their own.)
You may equally well request color emulation by setting the environment
variable
.SB EMULATE_COLOR
to "yes".
.TP
.BI \-\-numbering\-font " name"
Set the font used for the numbering of the characters in the character
map(s) to be
.IR name ,
rather than the default.
.TP
.BI \-\-page\-size " pagesize"
Set the size of size of the page on which the character map(s) will be
positioned.
This is relevant only to
.BR "plotfont \-T svg" ,
.BR "plotfont \-T ai" ,
.BR "plotfont \-T ps" ,
.BR "plotfont \-T cgm" ,
.BR "plotfont \-T fig" ,
.BR "plotfont \-T pcl" ,
and
.BR "plotfont \-T hpgl" .
The default is "letter", which means an 8.5 inch by 11 inch page.
Any ISO page size in the range "a0".\|.\|."a4" or ANSI page size in the
range "a".\|.\|."e" may be specified ("letter" is an alias for "a" and
"tabloid" is an alias for "b").
"legal" and "ledger" are recognized page sizes also.
The environment variable
.SB PAGESIZE 
can equally well be used to specify the page size.
.IP ""
The graphics display in which each character map is drawn will be a square
region that would occupy nearly the full width of the specified page.
An alternative size for the graphics display can be specified.
For example, the page size could be specified as
"letter,xsize=4in,ysize=6in", or "a4,xsize=5.0cm,ysize=100mm".
For all of the above except
.BR "plotfont \-T hpgl" , 
the graphics display will, by default, be centered on the page.
For all of the above except
.B "plotfont \-T svg"
and
.BR "plotfont \-T cgm" ,
the graphics display may be repositioned manually, by specifying the
location of its lower left corner, relative to the lower left corner of the
page.
For example, the page size could be specified as
"letter,xorigin=2in,yorigin=3in", or "a4,xorigin=0.5cm,yorigin=0.5cm".
It is also possible to specify an offset vector.
For example, the page size could be specified as "letter,xoffset=1in",
or "letter,xoffset=1in,yoffset=1.2in", or "a4,yoffset=\-1cm".
In SVG format and WebCGM format it is possible to specify the size
of the graphics display, but not its position.
.TP
.BI \-\-rotation " angle"
Rotate the graphics display by
.IR angle " degrees."
Recognized values are "0", "90", "180", and "270".
"no" and "yes" are equivalent to "0" and "90", respectively.
The environment variable 
.SB ROTATION
can also be used to specify a rotation angle.
.TP
.BI \-\-pen\-color " name"
Set the pen color to be 
.IR name .
An unrecognized name sets the pen color to the default, which is "black".
.SS Options for Metafile Output
.LP
The following option is relevant only if the
.B \-T
option is omitted or if 
.B "\-T meta"
is used.
In this case the output of
.B plotfont
will be in GNU graphics metafile format.
It may be translated to other formats by invoking
.BR plot (1).
.TP
.B \-O
.br
.ns
.TP
.B \-\-portable\-output
Output the portable (human-readable) version of GNU metafile
format, rather than the binary version (the default).
The format of the binary version is machine-dependent.
.SS Informational Options
.TP 
.B \-\-help
Print a list of command-line options, and exit.
.TP
.B \-\-help\-fonts
Print a table of available fonts, and exit.
The table will depend on which output format
is specified with the 
.B \-T 
option.
.BR "plotfont \-T X" ,
.BR "plotfont \-T svg" ,
.BR "plotfont \-T ai" ,
.BR "plotfont \-T ps" ,
.BR "plotfont \-T cgm" ,
and 
.B plotfont \-T fig
each support the 35 standard Postscript fonts.
.BR "plotfont \-T svg" ,
.BR "plotfont \-T pcl" ,
and 
.B plotfont \-T hpgl
support the 45 standard PCL 5 fonts, and the latter two support
a number of Hewlett\-Packard vector fonts.
All seven support a set of 22 Hershey vector fonts, as do
.BR "plotfont \-T png" ,
.BR "plotfont \-T pnm" ,
.BR "plotfont \-T gif" ,
.BR "plotfont \-T regis" ,
and
.BR "plotfont \-T tek" .
.B plotfont
without a
.B \-T
option in principle
supports any of these fonts, since its output must be translated
to other formats by invoking
.BR plot (1).
.TP
.B \-\-list\-fonts
Like 
.BR \-\-help\-fonts , 
but lists the fonts in a single column to facilitate piping to other
programs.
If no output format is specified with the
.B \-T
option, the full set of supported fonts is listed.
.TP
.B \-\-version
Print the version number of 
.B plotfont
and the plotting utilities package, and exit.
.SH "ENVIRONMENT"
The environment variables 
.SB BITMAPSIZE,
.SB PAGESIZE,
.SB BG_COLOR,
.SB EMULATE_COLOR,
and
.SB ROTATION
serve as backups for the options 
.BR \-\-bitmap\-size , 
.BR \-\-page\-size ,
.BR \-\-bg\-color , 
.BR \-\-emulate\-color , 
and
.BR \-\-rotation ,
respectively.
The remaining environment variables are specific to individual output formats.
.LP
.BR "plotfont \-T X" ,
which pops up a window on an X Window System display for each character
map, checks the
.SB DISPLAY
environment variable.
Its value determines the display that will be used.
.LP
.BR "plotfont \-T png"
and
.BR "plotfont \-T gif" ,
which produce output in PNG format and pseudo-GIF format respectively,
are affected by the 
.SB INTERLACE
environment variable.
If its value is "yes", the output will be interlaced.
Also, if the 
.SB TRANSPARENT_COLOR
environment variable is set to the name of a color, that color will
be treated as transparent in the output.
.LP
.BR "plotfont \-T pnm" ,
which produces output in portable anymap (PBM/PGM/PPM) format,
is affected by the 
.SB PNM_PORTABLE
environment variable.
If its value is "yes", the output will be in a human-readable format
rather than binary (the default).
.LP
.BR "plotfont \-T cgm" ,
which produces output in CGM (Computer Graphics Metafile) format,
is affected by the 
.SB CGM_MAX_VERSION
and
.SB CGM_ENCODING
environment variables.
By default, it produces a binary-encoded version of CGM version 3 format.
For backward compatibility, the version number may be reduced by setting
.SB CGM_MAX_VERSION
to "2" or "1".
Irrespective of version, the output CGM file will use the human-readable
clear text encoding if 
.SB CGM_ENCODING
is set to "clear_text".
However, only binary-encoded CGM files conform to the WebCGM profile.
.LP
.BR "plotfont \-T pcl" ,
which produces PCL 5 output for Hewlett\-Packard
printers and plotters, is affected by the environment variable
.SB PCL_ASSIGN_COLORS.
It should be set to "yes" when producing PCL 5 output for a color printer 
or other color device.
This will ensure accurate color reproduction by giving the output device
complete freedom in assigning colors, internally, to its "logical pens".
If it is "no" then the device will use a fixed set
of colored pens, and will emulate other colors by shading.
The default is "no" because monochrome PCL 5 devices, which are much more
common than colored ones, must use shading to emulate color.
.LP
.BR "plotfont \-T hpgl" ,
which produces Hewlett\-Packard Graphics Language
output, is affected by several environment variables.
The most important is 
.SB HPGL_VERSION,
which may be set to "1", "1.5", or "2" (the default).
"1" means that the output should be generic HP-GL, "1.5" means that the
output should be suitable for the HP7550A graphics plotter and the HP758x,
HP7595A and HP7596A drafting plotters (HP-GL with some HP-GL/2 extensions),
and "2" means that the output should be modern HP-GL/2.
If the version is "1" or "1.5" then the only available fonts will be vector
fonts, and all lines will be drawn with a default width.
Additionally, if the version is "1" then the filling of arbitrary curves
with solid color will not be supported (circles and rectangles aligned with
the coordinate axes may be filled, though).
.LP
The position of the 
.B plotfont \-T hpgl
graphics display on the page
can be rotated 90 degrees counterclockwise by setting the
.SB HPGL_ROTATE
environment variable to "yes".
This is not the same as the rotation obtained with the 
.B \-\-rotation
option, since it both rotates the graphics display and repositions its
lower left corner toward another corner of the page.  Besides "no" and
"yes", recognized values for 
.SB HPGL_ROTATE
are "0", "90", "180", and "270".  
"no" and "yes" are equivalent to "0" and
"90", respectively.
"180" and "270" are supported only if 
.SB HPGL_VERSION
is "2" (the default).
.LP
By default, 
.B plotfont \-T hpgl
will draw with a fixed set of pens.
Which pens are present may be specified by setting the
.SB HPGL_PENS
environment variable.
If
.SB HPGL_VERSION
is "1", the default value of
.SB HPGL_PENS
is "1=black"; if
.SB HPGL_VERSION
is "1.5" or "2", the default value of 
.SB HPGL_PENS
is "1=black:2=red:3=green:4=yellow:5=blue:6=magenta:7=cyan".
The format should be self-explanatory.
By setting
.SB HPGL_PENS
you may specify a color for any pen in the range #1.\|.\|.#31.
All color names recognized by the X Window System may be used.
Pen #1 must always be present, though it need not be black.
Any other pen in the range #1.\|.\|.#31 may be omitted.
.LP
If
.SB HPGL_VERSION
is "2" then 
.B plotfont \-T hpgl
will also be
affected by the environment variable 
.SB HPGL_ASSIGN_COLORS.
If its value is "yes", then 
.B plotfont \-T hpgl
will not be restricted to the palette specified in 
.SB HPGL_PENS: 
it will assign colors to "logical pens" in the range #1.\|.\|.#31, as needed.
The default value is "no" because other than color LaserJet printers and
DesignJet plotters, not many HP-GL/2 devices allow the assignment of colors
to logical pens.
.LP
Opaque filling and the drawing of visible white lines are supported
only if
.SB HPGL_VERSION
is "2" and the environment variable 
.SB HPGL_OPAQUE_MODE
is "yes" (the default).
If its value is "no" then white lines (if any), which are normally drawn
with pen #0, will not be drawn.
This feature is to accommodate older HP-GL/2 devices.
HP-GL/2 pen plotters, for example, do not support opacity or the use
of pen #0 to draw visible white lines.
Some older HP-GL/2 devices may, in fact, malfunction if asked to draw
opaque objects.
.LP
.BR "plotfont \-T tek" ,
which produces output for a Tektronix terminal or emulator, checks the
.SB TERM
environment variable.
If the value of
.SB TERM
is a string beginning with
"xterm", "nxterm", or "kterm", it is taken as a sign that
.B plotfont
is running in an X Window System VT100 terminal
emulator: a copy of
.BR xterm (1),
.BR nxterm (1),
or
.BR kterm (1).
Before drawing graphics,
.B plotfont \-T tek
will emit an escape sequence that causes the terminal emulator's auxiliary
Tektronix window, which is normally hidden, to pop up.
After the graphics are drawn, an escape sequence that returns control to
the original VT100 window will be emitted.
The Tektronix window will remain on the screen.
.LP
If the value of
.SB TERM
is a string beginning with
"kermit", "ansi.sys", or "nansi.sys", it is
taken as a sign that 
.B plotfont
is running in the VT100 terminal emulator provided by the MS-DOS version of
.BR kermit (1).
Before drawing graphics, \fBplotfont \-T tek\fP will emit an escape sequence
that switches the terminal emulator to Tektronix mode.
Also, some of the Tektronix control codes emitted by 
\fBplotfont \-T tek\fP will be \fBkermit\fP-specific.
There will be a limited amount of color support, which is not normally the
case (the 16 `ansi.sys' colors will be supported).
After drawing graphics, \fBplotfont \-T tek\fP will emit an escape sequence
that returns the emulator to VT100 mode.
The key sequence `ALT minus' can be employed manually within \fBkermit\fP
to switch between the two modes.
.SH "SEE ALSO"
.BR graph (1),
.BR pic2plot (1),
.BR tek2plot (1),
.BR plot (1),
.BR plot (3),
and "The GNU Plotting Utilities Manual".
.SH AUTHORS
.B plotfont
was written by Robert S. Maier (\fBrsm@math.arizona.edu\fP).
.SH BUGS
Email bug reports to
.BR bug\-gnu\-utils@gnu.org .