For the sake of old phototypesetters and compatibility with old versions
gtroff has the concept of font positions,
on which various fonts are mounted.
Mount font font at position pos (which must be a non-negative integer). This numeric position can then be referred to with font changing commands. When
gtroffstarts it is using font position 1 (which must exist; position 0 is unused usually at start-up).
The current font in use, as a font position, is available in the read-only number register ‘.f’. This can be useful to remember the current font for later recall. It is associated with the current environment (see Environments)..nr save-font \n[.f] .ft B ... text text text ... .ft \n[save-font].fp \n[.fp] NEATOFONT
Fonts not listed in the DESC file are automatically mounted on the next available font position when they are referenced. If a font is to be mounted explicitly with the
fprequest on an unused font position, it should be mounted on the first unused font position, which can be found in the
gtroffdoes not enforce this strictly, it is not allowed to mount a font at a position whose number is much greater (approx. 1000 positions) than that of any currently used position.
fprequest has an optional third argument. This argument gives the external name of the font, which is used for finding the font description file. The second argument gives the internal name of the font which is used to refer to the font in
gtroffafter it has been mounted. If there is no third argument then the internal name is used as the external name. This feature makes it possible to use fonts with long names in compatibility mode.
ft request and the
\f escape have alternative
syntax forms to access font positions.
If nnn is associated with a style (as set with the
styrequest or with the
stylescommand in the DESC file), use it within the current font family (as set with the
\Fescape, or with the
familycommand in the DESC file).this is font 1 .ft 2 this is font 2 .ft \" switch back to font 1 .ft 3 this is font 3 .ft this is font 1 again
See Changing Fonts, for the standard syntax form.