freebsd-dev/contrib/groff/man/groff_font.man

627 lines
12 KiB
Groff
Raw Normal View History

2001-07-10 17:09:00 +00:00
.ig
2002-10-11 08:52:17 +00:00
Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc.
1996-09-07 16:18:32 +00:00
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.
..
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.de TQ
.br
.ns
.TP \\$1
..
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.\" Like TP, but if specified indent is more than half
.\" the current line-length - indent, use the default indent.
.de Tp
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
.el .TP "\\$1"
..
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.SH NAME
groff_font \- format of groff device and font description files
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.SH DESCRIPTION
The groff font format is roughly a superset of the ditroff
font format.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The font files for device
.I name
are stored in a directory
.BI dev name.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
There are two types of file: a
device description file called
.B DESC
and for each font
.I F
a font file called
.IR F .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
These are text files;
2002-10-11 08:52:17 +00:00
unlike the ditroff font format,
1996-09-07 16:18:32 +00:00
there is no associated binary format.
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.SS DESC file format
2002-10-11 08:52:17 +00:00
.
The DESC file can contain the following types of line as shown below.
.
Later entries in the file override previous values.
.
1996-09-07 16:18:32 +00:00
.TP
2002-10-11 08:52:17 +00:00
.B charset
This line and everything following in the file are ignored.
.
It is allowed for the sake of backwards compatibility.
.
.TP
.BI family\ fam
The default font family is
.IR fam .
.
.TP
.BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn
Fonts
.I F1\|.\|.\|.\|Fn
will be mounted in the font positions
.IR m +1,\|.\|.\|., m + n
where
.I m
is the number of styles.
.
This command may extend over more than one line.
.
A font name of
.B 0
will cause no font to be mounted on the corresponding font position.
.
1996-09-07 16:18:32 +00:00
.TP
.BI hor\ n
The horizontal resolution is
.I n
machine units.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.TP
2002-10-11 08:52:17 +00:00
.BI paperheight\ n
The physical vertical dimension of the output medium in machine units.
.
This isn't used by
.B troff
itself; currently, only
.B grops
uses it.
.
1996-09-07 16:18:32 +00:00
.TP
2002-10-11 08:52:17 +00:00
.BI paperwidth\ n
The physical horizontal dimension of the output medium in machine units.
.
This isn't used by
.BR troff .
.
Currently, only the
.B grolbp
output device uses it.
.
.TP
.BI papersize\ string
Select a paper size.
.
Valid values for
.I string
are the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper
types letter, legal, tabloid, ledger, statement, executive, com10, and
monarch.
.
Case is not significant for
.IR string
if it holds predefined paper types.
.
Alternatively,
.I string
can be a file name (e.g.\& `/etc/papersize'); if the file can be opened,
.B groff
reads the first line and tests for the above paper sizes.
.
Finally,
.I string
can be a custom paper size in the format
.IB length , width
(no spaces before and after the comma).
.
Both
.I length
1996-09-07 16:18:32 +00:00
and
2002-10-11 08:52:17 +00:00
.I width
must have a unit appended; valid values are `i' for inches, `c' for
centimeters, `p' for points, and `P' for picas.
.
Example:
.BR 12c,235p .
.
An argument which starts with a digit is always treated as a custom paper
format.
.
.B papersize
sets both the vertical and horizontal dimension of the output medium.
.
.IP
More than one argument can be specified;
.B groff
scans from left to right and uses the first valid paper specification.
.
.
1996-09-07 16:18:32 +00:00
.TP
2002-10-11 08:52:17 +00:00
.B pass_filenames
Make troff tell the driver the source file name being processed.
.
This is achieved by another tcommand:
.B F
.IR filename .
.
.TP
.BI postpro\ program
Use
.I program
as the postprocessor.
.
1996-09-07 16:18:32 +00:00
.TP
2001-04-17 12:12:05 +00:00
.BI prepro\ program
Call
.I program
as a preprocessor.
2002-10-11 08:52:17 +00:00
.
2001-04-17 12:12:05 +00:00
.TP
2002-10-11 08:52:17 +00:00
.BI print\ program
2001-04-17 12:12:05 +00:00
Use
.I program
2002-10-11 08:52:17 +00:00
as the spooler program for printing.
.
If omitted, the
.B \-l
1996-09-07 16:18:32 +00:00
and
2002-10-11 08:52:17 +00:00
.B \-L
options of
.B groff
are ignored.
.
.TP
.BI res\ n
There are
.I n
machine units per inch.
.
1996-09-07 16:18:32 +00:00
.TP
.BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0
This means that the device has fonts at
.IR s1 ,
.IR s2 ,\|.\|.\|.\| sn
scaled points.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The list of sizes must be terminated by a
.BR 0 .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
Each
2002-10-11 08:52:17 +00:00
.I si
1996-09-07 16:18:32 +00:00
can also be a range of sizes
.IR m \- n .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The list can extend over more than one line.
2002-10-11 08:52:17 +00:00
.
.TP
.BI sizescale\ n
The scale factor for pointsizes.
.
By default this has a value of 1.
.
One
.I
scaled point
is equal to
one
.RI point/ n .
.
The arguments to the
.B unitwidth
and
.B sizes
commands are given in scaled points.
.
1996-09-07 16:18:32 +00:00
.TP
.BI styles\ S1\ S2\|.\|.\|.\|Sm
The first
.I m
font positions will be associated with styles
.IR S1\|.\|.\|.\|Sm .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.TP
2002-10-11 08:52:17 +00:00
.B tcommand
This means that the postprocessor can handle the
.B t
and
.B u
output commands.
.
1996-09-07 16:18:32 +00:00
.TP
2002-10-11 08:52:17 +00:00
.BI unitwidth\ n
Quantities in the font files are given in machine units
for fonts whose point size is
.I n
scaled points.
.
1996-09-07 16:18:32 +00:00
.TP
2000-12-05 18:49:44 +00:00
.B use_charnames_in_special
This command indicates that troff should encode named characters inside
special commands.
2002-10-11 08:52:17 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
2002-10-11 08:52:17 +00:00
.BI vert\ n
The vertical resolution is
.I n
machine units.
.
1996-09-07 16:18:32 +00:00
.LP
2002-10-11 08:52:17 +00:00
The
.BR res ,
.BR unitwidth ,
.BR fonts ,
and
.B sizes
lines are compulsory.
.
1996-09-07 16:18:32 +00:00
Other commands are ignored by
.B troff
but may be used by postprocessors to store arbitrary information
about the device in the DESC file.
2002-10-11 08:52:17 +00:00
.
2000-12-05 18:49:44 +00:00
.LP
Here a list of obsolete keywords which are recognized by
.B groff
but completely ignored:
.BR spare1 ,
.BR spare2 ,
.BR biggestfont .
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.SS Font file format
2002-10-11 08:52:17 +00:00
.
A font file has two sections.
The first section is a sequence
1996-09-07 16:18:32 +00:00
of lines each containing a sequence of blank delimited
words; the first word in the line is a key, and subsequent
words give a value for that key.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.TP
.BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
Characters
.IR lig1 ,
2002-10-11 08:52:17 +00:00
.IR lig2 ,\ \|.\|.\|.,\ lign
1996-09-07 16:18:32 +00:00
are ligatures; possible ligatures are
.BR ff ,
.BR fi ,
2000-12-05 18:49:44 +00:00
.BR fl ,
.B ffi
1996-09-07 16:18:32 +00:00
and
.BR ffl .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
For backwards compatibility, the list of ligatures may be terminated
with a
.BR 0.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The list of ligatures may not extend over more than one line.
2002-10-11 08:52:17 +00:00
.
.TP
.BI name\ F
The name of the font is
.IR F .
.
.TP
.BI slant\ n
The characters of the font have a slant of
.I n
degrees.
.
(Positive means forward.)
.
.TP
.BI spacewidth\ n
The normal width of a space is
.IR n .
.
1996-09-07 16:18:32 +00:00
.TP
.B special
The font is
.IR special ;
this means that when a character is requested that is not present in
the current font, it will be searched for in any special fonts that
are mounted.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
Other commands are ignored by
.B troff
but may be used by postprocessors to store arbitrary information
about the font in the font file.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The first section can contain comments which start with the
.B #
character and extend to the end of a line.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The second section contains one or two subsections.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
It must contain a
.I charset
subsection
and it may also contain a
.I kernpairs
subsection.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
These subsections can appear in any order.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
Each subsection starts with a word on a line by itself.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The word
.B charset
starts the charset subsection.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
.B charset
line is followed by a sequence of lines.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
Each line gives information for one character.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
A line comprises a number of fields separated
2002-10-11 08:52:17 +00:00
by blanks or tabs.
.
The format is
.
1996-09-07 16:18:32 +00:00
.IP
2000-12-05 18:49:44 +00:00
.I name metrics type code
.RI [ entity_name ]
.RB [ --
.IR comment ]
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
.I name
identifies the character:
if
.I name
is a single character
.I c
then it corresponds to the groff input character
.IR c ;
if it is of the form
2002-10-11 08:52:17 +00:00
.BI \[rs] c
1996-09-07 16:18:32 +00:00
where c is a single character, then it
2002-10-11 08:52:17 +00:00
corresponds to the special character
.BI \[rs][ c ]\fR;
1996-09-07 16:18:32 +00:00
otherwise it corresponds to the groff input character
2002-10-11 08:52:17 +00:00
.BI \[rs][ name ]\fR.
.
If it is exactly two characters
1996-09-07 16:18:32 +00:00
.I xx
it can be entered as
2002-10-11 08:52:17 +00:00
.BI \[rs]( xx\fR.
.
Note that single-letter special characters can't be accessed as
.BI \[rs] c\fR;
the only exception is `\[rs]-' which is identical to `\[rs][-]'.
.
The name
.B \-\-\-
is special and indicates that the character is unnamed;
such characters can only be used by means of the
.B \[rs]N
escape sequence in
.BR troff .
.
.LP
Groff supports eight-bit characters; however some utilities
have difficulties with eight-bit characters.
.
1996-09-07 16:18:32 +00:00
For this reason, there is a convention that the name
.BI char n
is equivalent to the single character whose code is
2002-10-11 08:52:17 +00:00
.IR n .
.
1996-09-07 16:18:32 +00:00
For example,
.B char163
would be equivalent to the character with code 163
which is the pounds sterling sign in ISO Latin-1.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The
.I type
field gives the character type:
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.TP
1
2002-10-11 08:52:17 +00:00
means the character has a descender, for example, p;
.
1996-09-07 16:18:32 +00:00
.TP
2
means the character has an ascender, for example, b;
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.TP
3
means the character has both an ascender and a descender, for example,
(.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The
.I code
field gives the code which the postprocessor uses to print the character.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The character can also be input to groff using this code by means of the
2002-10-11 08:52:17 +00:00
.B \[rs]N
1996-09-07 16:18:32 +00:00
escape sequence.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The code can be any integer.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
If it starts with a
.B 0
it will be interpreted as octal;
if it starts with
.B 0x
or
.B 0X
it will be intepreted as hexadecimal.
2002-10-11 08:52:17 +00:00
.
Note, however, that the
.B \[rs]N
escape sequence only accepts a decimal integer.
.
1996-09-07 16:18:32 +00:00
.LP
2000-12-05 18:49:44 +00:00
The
.I entity_name
field gives an ascii string identifying the glyph which the postprocessor
uses to print the character.
2002-10-11 08:52:17 +00:00
.
2000-12-05 18:49:44 +00:00
This field is optional and has been introduced so that the html device driver
can encode its character set.
2002-10-11 08:52:17 +00:00
.
For example, the character `\[rs][Po]' is represented as `£' in
html\~4.0.
.
2000-12-05 18:49:44 +00:00
.LP
Anything on the line after the encoding field resp. after `-\&-' will
be ignored.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The
.I metrics
2002-10-11 08:52:17 +00:00
field has the form (in one line; it is broken here for the sake of
readability):
.
1996-09-07 16:18:32 +00:00
.IP
2002-10-11 08:52:17 +00:00
.IR width [\fB, height [\fB, depth [\fB, italic-correction
.br
.RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]]
.
1996-09-07 16:18:32 +00:00
.LP
There must not be any spaces between these subfields.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
Missing subfields are assumed to be 0.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The subfields are all decimal integers.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
Since there is no associated binary format, these
values are not required to fit into a variable of type
.B char
as they are in ditroff.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
.I width
subfields gives the width of the character.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
.I height
subfield gives the height of the character (upwards is positive);
if a character does not extend above the baseline, it should be
given a zero height, rather than a negative height.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
.I depth
subfield gives the depth of the character, that is, the distance
below the lowest point below the baseline to which the
character extends (downwards is positive);
if a character does not extend below above the baseline, it should be
given a zero depth, rather than a negative depth.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
2002-10-11 08:52:17 +00:00
.I italic-correction
1996-09-07 16:18:32 +00:00
subfield gives the amount of space that should be added after the
character when it is immediately to be followed by a character
from a roman font.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
2002-10-11 08:52:17 +00:00
.I left-italic-correction
1996-09-07 16:18:32 +00:00
subfield gives the amount of space that should be added before the
character when it is immediately to be preceded by a character
from a roman font.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
The
2002-10-11 08:52:17 +00:00
.I subscript-correction
1996-09-07 16:18:32 +00:00
gives the amount of space that should be added after a character
before adding a subscript.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
This should be less than the italic correction.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
A line in the charset section can also have the format
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.IP
.I
name \fB"
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
This indicates that
.I name
is just another name for the character mentioned in the
preceding line.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.LP
The word
.B kernpairs
starts the kernpairs section.
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
This contains a sequence of lines of the form:
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.IP
2002-10-11 08:52:17 +00:00
.I c1 c2 n
.
1996-09-07 16:18:32 +00:00
.LP
This means that when character
.I c1
appears next to character
.I c2
the space between them should be increased by
.IR n .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
Most entries in kernpairs section will have a negative value for
.IR n .
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.SH FILES
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.Tp \w'@FONTDIR@/devname/DESC'u+3n
.BI @FONTDIR@/dev name /DESC
Device description file for device
.IR name .
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.TP
.BI @FONTDIR@/dev name / F
Font file for font
.I F
of device
.IR name .
2002-10-11 08:52:17 +00:00
.
.
1996-09-07 16:18:32 +00:00
.SH "SEE ALSO"
2002-10-11 08:52:17 +00:00
.
1996-09-07 16:18:32 +00:00
.BR groff_out (@MAN5EXT@),
.BR @g@troff (@MAN1EXT@).
2001-07-10 17:09:00 +00:00
.
.\" Local Variables:
.\" mode: nroff
.\" End: