ft request and the
\f escape change the current font
to font (one-character name f, two-character name
If font is a style name (as set with the
sty request or
styles command in the DESC file), use it within
the current font family (as set with the
fam request, the
\F escape, or the
family command in the DESC file).
It is not possible to switch to a font with the name ‘DESC’ (whereas this name could be used as a style name; however, this is not recommended).
With no argument or using ‘P’ as an argument,
to the previous font. Use
\f to do this with the escape. The
old syntax forms
\f[P] are also supported.
Fonts are generally specified as upper-case strings, which are usually 1 to 4 characters representing an abbreviation or acronym of the font name. This is no limitation, just a convention.
The example below produces two identical lines.
eggs, bacon, .ft B spam .ft and sausage. eggs, bacon, \fBspam\fP and sausage.
\f doesn’t produce an input token in
a consequence, it can be used in requests like
mc (which expects
a single character as an argument) to change the font on the fly:
The current style name is available in the read-only number register ‘.sty’ (this is a string-valued register); if the current font isn’t a style, the empty string is returned. It is associated with the current environment.
See Font Positions, for an alternative syntax.
Translate font f to font g. Whenever a font
named f is referred to in a
\f escape sequence, in the
S conditional operators, or in the
sty requests, font g is
used. If g is missing or equal to f the translation is
Note that it is not possible to chain font translations. Example:
.ftr XXX TR .ftr XXX YYY .ft XXX ⇒ warning: can't find font `XXX'
Set magnification of font f to factor zoom, which must
be a non-negative integer multiple of 1/1000th. This request is useful
to adjust the optical size of a font in relation to the others. In the
example below, font
CR is magnified by 10% (the zoom factor is
.fam P .fzoom CR 1100 .ps 12 Palatino and \f[CR]Courier\f
A missing or zero value of zoom is the same as a value of 1000, which means no magnification. f must be a real font name, not a style.
Note that the magnification of a font is completely transparent to troff; a change of the zoom factor doesn’t cause any effect except that the dimensions of glyphs, (word) spaces, kerns, etc., of the affected font are adjusted accordingly.
The zoom factor of the current font is available in the read-only number register ‘.zoom’, in multiples of 1/1000th. It returns zero if there is no magnification.