FFFF minix/minix/man/man1/cawf.1 at master · xyang76/minix · GitHub
[go: up one dir, main page]

Skip to content
8000

Latest commit

 

History

History
760 lines (753 loc) · 18.6 KB

cawf.1

File metadata and controls

760 lines (753 loc) · 18.6 KB
.PP
The
.BI \-f font
option may be used with the
.BI \-d device
option, when the appropriate stanza in the device configuration file
contains an entry for the named
.IR font .
The
.B DEVICE CONFIGURATION FILE
section describes how fonts are defined in device configuration file
stanzas.
.SH DEVICE CONFIGURATION FILE
The device configuration file defines the special character codes
necessary to direct output devices to select fonts and to produce
bold, italic and Roman type faces.
.PP
The configuration file is usually found in
.I device.cf
in
.IR cawf 's
library directory (see the
.B FILES
section for more information).
It is organized into two main parts \- comments and device stanzas.
Comments are any lines that begin with the pound sign (`#') character.
They are informational only and
.I cawf
ignores them.
.I Cawf
also ignores empty lines, so they may be used as vertical white space.
.PP
Stanzas name devices and define their font and type face control strings.
A stanza begins with the name of the device, starting at the beginning
of a line and occupying the entire line.
The body of the stanza, defining fonts and type faces, is formed of
lines beginning with white space (a TAB or space characters) that
directly follow the device name.
.PP
Individual lines of the stanza body contain a key character, followed
by a equal sign, followed by the font name (if a font key) and the
output device control codes.
.I Cawf
issues the font control codes once, at the beginning of output, so
only one font may be selected.
The type face control codes are issued at each change of type face.
.PP
The key characters are:
.ne 4
.PP
.RS
.nf
b for bold
f for font definition
i for italic
r for Roman
.fi
.RE
.PP
The `b', `i' and `r' key codes are followed by an equal sign (`=') and
their control code definition.
The `f' key code is followed by an equal sign (`='), the font name,
another equal sign and the font control code definition.
.PP
Control code definitions may contain any printable ASCII characters.
Non\-printable characters may be encoded in octal notation with the `\\nnn'
form or in hexadecimal with the `\\xnn' form.
The special code, `\\E' (or `\\e') represents the ESC control
character (\\033 or \\x1b).
.PP
Here's a sample showing the definition for the HP LaserJet III.
The stanza name is ``lj3''.
All its non\-printable characters are ESCs; the first is coded in
octal form; the second with '\\E'; the rest, in hexadecimal form.
TAB is used as the leading white space character for the stanza
body lines.
.PP
.RS
.nf
# HP LaserJet III
lj3
b=\\033(s7B
i=\\E(s1S
r=\\x1b(s0B\\x1b(s0S
f=c10=\\x1b&l0O\\x1b(8U\\x1b(s0p12h10v0s0b3T
f=c12ibm=\\x1b&l0O\\x1b(10U\\x1b(s0p10.00h12.0v0s0b3T
f=lg12=\\x1b&l0O\\x1b(8U\\x1b(s12h12v0s0b6T
.fi
.RE
.PP
The distribution
.I device.cf
file defines the following devices and fonts.
.LP
.ta \w'kxp1180'u+3n +\w'Italic:'u+3n +\w'bps10'u+6n
.nf
.ne 3
epson dot matrix printer in Epson FX-86e/FX-800 mode
Bold: Double-strike
Fonts: none
.ne 4
ibmppds IBM Personal Printer Data Stream (PPDS) protocol
Bold: Double-strike
Italic: Underline
Fonts: none
.ne 12
kxp1124 Panasonic KX\-P1124 dot matrix printer in PGM mode
Bold: Emphasized
Fonts: c10 10 Characters Per Inch (CPI) Courier
c12 12 CPI Courier
bps10 10 CPI Bold PS
bps12 12 CPI Bold PS
p10 10 CPI Prestige
p12 12 CPI Prestige
s10 10 CPI Script
s12 12 CPI Script
ss10 10 CPI Sans Serif
ss12 12 CPI Sans Serif
.ne 10
kxp1180 Panasonic KX\-P1180 dot matrix printer in PGM mode
Bold: Emphasized
Fonts: c10 10 Characters Per Inch (CPI) Courier
c12 12 CPI Courier
bps10 10 CPI Bold PS
bps12 12 CPI Bold PS
p10 10 CPI Prestige
p12 12 CPI Prestige
ss10 10 CPI Sans Serif
ss12 12 CPI Sans Serif
.ne 6
lj3 HP LaserJet III
Fonts: c10 10 point, 12 Characters Per Inch (CPI)
Courier
c12ibm 12 point, 10 CPI Courier, IBM\-PC
Symbol Set
lg12 12 point, 12 CPI Letter Gothic
.ne 4
vgamono VGA monochrome monitor for MS\-DOS
(ANSI.SYS driver required for MS\-DOS)
Italic: Reverse-video
Fonts: none
.SH FILES
.I Cawf
resource files are located in the
.I cawf
library directory \- \fI C:\\SYS\\LIB\\CAWF\fP, the MS\-DOS environment
default;
or
.IR /usr/lib/cawf ,
the UNIX environment default.
These defaults can be overridden by the CAWFLIB environment variable,
or changed in the cawflib.h header file.
.ta \w'device.cf'u+3n
.nf
common common device-independent initialization
device.cf output device configurations
*.dev device-specific initialization
m*.mac macro package files
.SH DIAGNOSTICS
Unlike
.IR nroff ,
.I cawf
complains whenever it sees unknown requests.
All diagnostics appear on the standard error file.
.ad
.SH HISTORY
Vic Abell of Purdue University <abe@cc.purdue.edu> derived
.I cawf
from
.IR awf ,
\&``the Amazingly Workable (text) Formatter,''
written by Henry Spencer of the University of Toronto.
The Toronto work was a supplement to the C News project.
The Purdue effort was aimed at producing a C language version that
would run on small systems, particularly MS\-DOS ones.
The adaptation of the
.B me
macros was done by Chet Creider <creider@csd.uwo.ca>.
Chet also contributed ideas for device, font and type face support.
.PP
The MS\-DOS version of
.I cawf
has been compiled with version 2.5 of Microsoft's Quick-C compiler.
It runs under the Mortis Kern Systems Toolkit KornShell,
.IR ksh (1),
and COMMAND.COM.
.SH BUGS
Nroff and troff mavens will have many complaints.
Some may even represent bugs and not deliberate omissions.
.PP
Watch out for scaling factors - especially on requests like
.BR \ew .
.PP
The overprinting required to create bold and italicized characters is
tiresome on a slow printer.
The
.IR bsfilt (1)
post\-filter from this distribution may be used to alleviate that
nuisance by managing the backspacing codes from
.IR cawf 's
NORMAL device output.
.PP
The printing of bold and italic characters is sometimes better handled by
special printer codes.
Use
.IR cawf 's
.B \-c
.IR config ,
.BI \-d device
and
.BI \-f font
options to produce special font and device output control codes.
.PP
.I Cawf
has a small amount of built-in code for the
.BR man ,
.B me
and
.B ms
macro packages, but none for any others.
.PP
The stacking for the
.B .so
request is limited.
.SH SEE ALSO
bsfilt(1),
colcrt(1),
man(7),
me(7),
ms(7)
and
nroff(1).
0