Next: Characters and Glyphs, Previous: Font Families, Up: Using Fonts [Contents][Index]
To support typeface indirection through abstract styles,
and for compatibility with AT&T
troff,
the formatter maintains a list of
positions
at which fonts required by a document are
mounted.
An output device’s description file
DESC
typically configures a set of pre-mounted
fonts.178
A font need not be explicitly mounted before it is selected;
GNU
troff
searches
GROFF_FONT_PATH
for a file name matching the identifier and mount it on demand.
Mount a font under the name id at mounting position pos, a
non-negative integer. When the formatter starts up, it reads the output
device’s description to mount an initial set of faces, and selects font
position 1. Position 0 is unused by default. Unless the
font-description-file-name argument is given, id should be
the name of a font description file stored in a directory corresponding
to the selected output device. GNU troff does not traverse
directories to locate the font description file.
The optional third argument enables font names to be aliased,
which can be necessary
in compatibility mode179
since AT&T
troff
syntax affords no means of identifying fonts
with names longer than two characters,
like
‘TBI’
or
‘ZCMI’,
in a font selection escape sequence.
You can also alias fonts on mounting for convenience or abstraction.
(See below regarding the
.fp
register.)
.fp \n[.fp] SC ZCMI Send a \f(SChand-written\fP thank-you note. .fp \n[.fp] Emph TI .fp \n[.fp] Strong TB Are \f[Emph]these names\f[] \f[Strong]comfortable\f[]?
‘DESC’, ‘P’, and non-negative integers are not usable as font identifiers.
Obtain a report of occupied font mounting positions
(whether configured by the
‘DESC’
file,
the
fp
request,
or automatic mounting)
on the standard error stream with the
pfp
request.180
The position of the currently selected font (or abstract style) is available in the read-only register ‘.f’.
Copy the value of
.f
to another register to save it for later use.
.nr sF \n(.f
… text involving many font changes …
.ft \n(sF
The index of the next (non-zero) free font mounting position
is available in the read-only register
‘.fp’.
When using the
ft
request or
\f
escape sequence
to select a font by name that is not listed in the device’s
DESC
file,
GNU
troff automatically mounts it
at position
‘\n[.fp]’.
If you mount a font at a position explicitly
with the
fp
request,
you should follow the same practice,
though the program
does not strictly enforce adherence.181
Next: Characters and Glyphs, Previous: Font Families, Up: Using Fonts [Contents][Index]