BSD 4_4_Lite2 development
[unix-history] / usr / share / man / cat5 / groff_font.0
GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@)
N\bNA\bAM\bME\bE
groff_font - format of groff device and font description
files
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The groff font format is roughly a superset of the ditroff
font format. Unlike the ditroff font format, there is no
associated binary format. The font files for device _\bn_\ba_\bm_\be
are stored in a directory d\bde\bev\bv_\bn_\ba_\bm_\be_\b. There are two types of
file: a device description file called D\bDE\bES\bSC\bC and for each
font _\bF a font file called _\bF. These are text files; there
is no associated binary format.
D\bDE\bES\bSC\bC f\bfi\bil\ble\be f\bfo\bor\brm\bma\bat\bt
The DESC file can contain the following types of line:
r\bre\bes\bs _\bn There are _\bn machine units per inch.
h\bho\bor\br _\bn The horizontal resolution is _\bn machine units.
v\bve\ber\brt\bt _\bn The vertical resolution is _\bn machine units.
s\bsi\biz\bze\bes\bsc\bca\bal\ble\be _\bn
The scale factor for pointsizes. By default this
has a value of 1. One _\bs_\bc_\ba_\bl_\be_\bd _\bp_\bo_\bi_\bn_\bt is equal to one
point/_\bn. The arguments to the u\bun\bni\bit\btw\bwi\bid\bdt\bth\bh and s\bsi\biz\bze\bes\bs
commands are given in scaled points.
u\bun\bni\bit\btw\bwi\bid\bdt\bth\bh _\bn
Quantities in the font files are given in machine
units for fonts whose point size is _\bn scaled
points.
t\btc\bco\bom\bmm\bma\ban\bnd\bd
This means that the postprocessor can handle the t\bt
and u\bu output commands.
s\bsi\biz\bze\bes\bs _\bs_\b1 _\bs_\b2_\b._\b._\b._\bs_\bn 0\b0
This means that the device has fonts at _\bs_\b1,
_\bs_\b2,..._\bs_\bn scaled points. The list of sizes must be
terminated by a 0\b0. Each s\bs_\bi can also be a range of
sizes _\bm-_\bn. The list can extend over more than one
line.
s\bst\bty\byl\ble\bes\bs _\bS_\b1 _\bS_\b2_\b._\b._\b._\bS_\bm
The first _\bm font positions will be associated with
styles _\bS_\b1_\b._\b._\b._\bS_\bm.
f\bfo\bon\bnt\bts\bs _\bn _\bF_\b1 _\bF_\b2 _\bF_\b3_\b._\b._\b._\bF_\bn
Fonts _\bF_\b1_\b._\b._\b._\bF_\bn will be mounted in the font positions
_\bm+1,...,_\bm+_\bn where _\bm is the number of styles. This
Groff Version @VERSION@ @MDATE@ 1
GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@)
command may extend over more than one line. A font
name of 0\b0 will cause no font to be mounted on the
corresponding font position.
f\bfa\bam\bmi\bil\bly\by _\bf_\ba_\bm
The default font family is _\bf_\ba_\bm.
c\bch\bha\bar\brs\bse\bet\bt
This line and everything following in the file are
ignored. It is allowed for the sake of backwards
compatibility.
The res, unitwidth, fonts and sizes lines are compulsory.
Other commands are ignored by t\btr\bro\bof\bff\bf but may be used by
postprocessors to store arbitrary information about the
device in the DESC file.
F\bFo\bon\bnt\bt f\bfi\bil\ble\be f\bfo\bor\brm\bma\bat\bt
A font file has two sections. The first section is a
sequence 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.
n\bna\bam\bme\be _\bF The name of the font is _\bF.
s\bsp\bpa\bac\bce\bew\bwi\bid\bdt\bth\bh _\bn
The normal width of a space is _\bn.
s\bsl\bla\ban\bnt\bt _\bn
The characters of the font have a slant of _\bn
degrees. (Positive means forward.)
l\bli\big\bga\bat\btu\bur\bre\bes\bs _\bl_\bi_\bg_\b1 _\bl_\bi_\bg_\b2_\b._\b._\b._\bl_\bi_\bg_\bn [0\b0]
Characters _\bl_\bi_\bg_\b1, _\bl_\bi_\bg_\b2,...,_\bl_\bi_\bg_\bn are ligatures; pos-
sible ligatures are f\bff\bf, f\bfi\bi, f\bfl\bl and f\bff\bfl\bl. For back-
wards compatibiliy, the list of ligatures may be
terminated with a 0\b0.\b. The list of ligatures may not
extend over more than one line.
s\bsp\bpe\bec\bci\bia\bal\bl
The font is _\bs_\bp_\be_\bc_\bi_\ba_\bl; this means that when a charac-
ter is requested that is not present in the current
font, it will be searched for in any special fonts
that are mounted.
Other commands are ignored by t\btr\bro\bof\bff\bf but may be used by
postprocessors to store arbitrary information about the
font in the font file.
The first section can contain comments which start with
the #\b# character and extend to the end of a line.
Groff Version @VERSION@ @MDATE@ 2
GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@)
The second section contains one or two subsections. It
must contain a _\bc_\bh_\ba_\br_\bs_\be_\bt subsection and it may also contain
a _\bk_\be_\br_\bn_\bp_\ba_\bi_\br_\bs subsection. These subsections can appear in
any order. Each subsection starts with a word on a line
by itself.
The word c\bch\bha\bar\brs\bse\bet\bt starts the charset subsection. The
c\bch\bha\bar\brs\bse\bet\bt line is followed by a sequence of lines. Each
line gives information for one character. A line com-
prises a number of fields separated by blanks or tabs. The
format is
_\bn_\ba_\bm_\be _\bm_\be_\bt_\br_\bi_\bc_\bs _\bt_\by_\bp_\be _\bc_\bo_\bd_\be _\bc_\bo_\bm_\bm_\be_\bn_\bt
_\bn_\ba_\bm_\be identifies the character: if _\bn_\ba_\bm_\be is a single charac-
ter _\bc then it corresponds to the groff input character _\bc;
if it is of the form \\b\_\bc where c is a single character,
then it corresponds to the groff input character \\b\_\bc; oth-
erwise it corresponds to the groff input character \\b\[\b[_\bn_\ba_\bm_\be]\b]
(if it is exactly two characters _\bx_\bx it can be entered as
\\b\(\b(_\bx_\bx.) Groff supports eight bit characters; however some
utilities has difficulties with eight bit characters. For
this reason, there is a convention that the name c\bch\bha\bar\br_\bn is
equivalent to the single character whose code is _\bn _\b. For
example, c\bch\bha\bar\br1\b16\b63\b3 would be equivalent to the character with
code 163 which is the pounds sterling sign in ISO Latin-1.
The name -\b--\b--\b- is special and indicates that the character
is unnamed; such characters can only be used by means of
the \\b\N\bN escape sequence in t\btr\bro\bof\bff\bf.
The _\bt_\by_\bp_\be field gives the character type:
1 means the character has an descender, for example,
p;
2 means the character has an ascender, for example,
b;
3 means the character has both an ascender and a
descender, for example, (.
The _\bc_\bo_\bd_\be field gives the code which the postprocessor uses
to print the character. The character can also be input
to groff using this code by means of the \\b\N\bN escape
sequence. The code can be any integer. If it starts with
a 0\b0 it will be interpreted as octal; if it starts with 0\b0x\bx
or 0\b0X\bX it will be intepreted as hexdecimal.
Anything on the line after the code field will be ignored.
The _\bm_\be_\bt_\br_\bi_\bc_\bs field has the form:
Groff Version @VERSION@ @MDATE@ 3
GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@)
_\bw_\bi_\bd_\bt_\bh[,\b,_\bh_\be_\bi_\bg_\bh_\bt[,\b,_\bd_\be_\bp_\bt_\bh[,\b,_\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn[,\b,_\bl_\be_\bf_\bt_\b__\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn[,\b,_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn]]]]]
There must not be any spaces between these subfields.
Missing subfields are assumed to be 0. The subfields are
all decimal integers. Since there is no associated binary
format, these values are not required to fit into a vari-
able of type c\bch\bha\bar\br as they are in ditroff. The _\bw_\bi_\bd_\bt_\bh sub-
fields gives the width of the character. The _\bh_\be_\bi_\bg_\bh_\bt sub-
field gives the height of the character (upwards is posi-
tive); if a character does not extend above the baseline,
it should be given a zero height, rather than a negative
height. The _\bd_\be_\bp_\bt_\bh subfield gives the depth of the charac-
ter, 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. The _\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn 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. The _\bl_\be_\bf_\bt_\b__\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn subfield gives
the amount of space that should be added before the char-
acter when it is immediately to be preceded by a character
from a roman font. The _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn gives the
amount of space that should be added after a character
before adding a subscript. This should be less than the
italic correction.
A line in the charset section can also have the format
_\bn_\ba_\bm_\be "\b"
This indicates that _\bn_\ba_\bm_\be is just another name for the
character mentioned in the preceding line.
The word k\bke\ber\brn\bnp\bpa\bai\bir\brs\bs starts the kernpairs section. This
contains a sequence of lines of the form:
_\bc_\b1 _\bc_\b2 _\bn
This means that when character _\bc_\b1 appears next to charac-
ter _\bc_\b2 the space between them should be increased by _\bn.
Most entries in kernpairs section will have a negative
value for _\bn.
F\bFI\bIL\bLE\bES\bS
@\b@F\bFO\bON\bNT\bTD\bDI\bIR\bR@\b@/\b/d\bde\bev\bv_\bn_\ba_\bm_\be/\b/D\bDE\bES\bSC\bC Device description file for
device _\bn_\ba_\bm_\be.
@\b@F\bFO\bON\bNT\bTD\bDI\bIR\bR@\b@/\b/d\bde\bev\bv_\bn_\ba_\bm_\be/\b/_\bF Font file for font _\bF of device
_\bn_\ba_\bm_\be.
Groff Version @VERSION@ @MDATE@ 4
GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@)
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
g\bgr\bro\bof\bff\bf_\b_o\bou\but\bt(@MAN5EXT@), @\b@g\bg@\b@t\btr\bro\bof\bff\bf(@MAN1EXT@).
Groff Version @VERSION@ @MDATE@ 5