Next: Ligatures and Kerning, Previous: Special Fonts, Up: Using Fonts [Contents][Index]
Some requests and escape sequences apply simple transformations
to glyph shapes,
or draw rules beneath the text baseline (underlining).
These features are largely vestiges of the days
when output devices lacked a wide variety of fonts,
and when
nroff
and
troff
were separate formatters.
GNU
troff
retains support for them even though they are seldom needed nowadays.
'height''+height''-height'Set (increment, decrement) the height of the current font, but not its width. If height is zero, the formatter uses the font’s inherent height for its type size. The default scaling unit is ‘z’.
Changing the font height does not affect vertical spacing;
dramatic changes may be better accompanied by an
\x
escape sequence to add extra pre-vertical space to the output line.
Recall Manipulating Spacing.
The read-only register
.height
interpolates the font height.
As of this writing, only the ps and pdf output devices support this feature.
The formatter does not tokenize
\H
when reading it;
the escape sequence
updates the environment.197
It thus can be used in requests that expect a single-character argument.
We can alter the font height of a margin character
as follows.198
.mc \H'+5z'x\H'0'
In compatibility mode,199
GNU
troff
behaves differently:
it applies an increment or decrement to the current type size
and not to the previously selected font height.
.cp 1 \H'+5'test \H'+5'test
prints the word ‘test’ twice with the same font height—five points larger than the current font size.
'slant'Slant the glyphs of the currently selected font by slant degrees. Positive values slant in the direction of text flow. Only integer values are possible.
The read-only register
.slant
interpolates the font slant.
As of this writing, only the ps and pdf output devices support this feature.
The formatter does not tokenize
\S
when reading it;
the escape sequence
updates the environment.200
It thus can be used in requests that expect a single-character argument.
We can apply a slant to a margin character
as follows.201
.mc \S'20'x\S'0'
This escape sequence is incorrectly documented in the
AT&T
troff manual:
the slant is only assigned,
never incremented or decremented.
Underline
(in
nroff
mode)
or italicize
(in
troff
mode; recall
troff and nroff Modes)
the next
n
productive input lines.
A nonpositive argument cancels any pending underlining.
Omitting the argument implies an
n
of
‘1’.
The read-only register
.ul
stores the count of productive input lines
remaining to be underlined,
which is associated with the environment.202
When
ul
commences underlining,
the formatter stores the currently selected font
(strictly,
its mounting position),
and restores that font when underlining ceases.
Use the
uf
request to select an alternative underline font.
The ul request does not cause spaces to be underlined.
The cu request is similar to ul but underlines spaces as
well (if a TTY output device is used).
Set the underline font (globally) used by ul and cu. By
default, this is the font at mounting position 2.
font
is a font identifier or mounting position.
Embolden font by overstriking its glyphs offset by offset units minus one.
Two syntax forms are available.
font is a font identifier or mounting position.
offset is available in the .b read-only register if a
special font is active; in the bd request, its default unit is
‘u’.
Because the emboldening is conditional, it applies only if the glyph to
be formatted is not available in the current font. font1 must
therefore be a special font, configured either with the special
directive in its font description file or with the fspecial
request).
Apply constant glyph spacing to font font. The advance width of every glyph in the font—the amount the drawing position moves horizontally after setting the glyph—becomes width/36 ems. The em-size argument overrides the font’s em size; omitting it preserves the formatter’s usual recomputation of font’s em size from the type size in effect each time that font is selected. Omitting both the second and third arguments deactivates constant glyph spacing for font font.
The default scaling unit for em-size is ‘z’; width is an integer.
Next: Ligatures and Kerning, Previous: Special Fonts, Up: Using Fonts [Contents][Index]