gbranden pushed a commit to branch master
in repository groff.
commit 6fcd8465b84014d2e36543e5f1e37c8ec7902eb0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Apr 27 00:40:23 2026 -0500
[doc,man]: Clarify `\f` and `ft` behavior.
* Discuss what is done with an argument before the case where the
argument is omitted.
* Explicitly state that the current font becomes the previous when
making a selection.
* Be more explicit about changed behavior vs. AT&T in groff_diff(7).
---
doc/groff.texi.in | 24 +++++++++---------------
man/groff.7.man | 16 +++++++++++-----
man/groff_diff.7.man | 36 +++++++++++++++++++++++++++++++-----
3 files changed, 51 insertions(+), 25 deletions(-)
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 117a34ace..c32ccfa64 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -12579,15 +12579,8 @@ default family.
@cindex selecting the previous font (@code{ft})
@cindex previous font, selecting (@code{ft})
@cindex font, previous, selecting (@code{ft})
-The
-@code{ft}
-request selects the typeface
+Select the typeface
@var{font}.
-If the argument is absent or
-@samp{P},
-it selects the previously used typeface;
-if there is none,
-the formatter ignores the request.
If
@var{font}
is an integer,
@@ -12609,17 +12602,18 @@ is
@samp{DESC},
if the mounting position is not an abstract style
and no font is mounted there,
-or the mounting position is negative,
-GNU
+or if the mounting position is negative,
+the formatter ignores the request.@footnote{GNU
@command{troff} @c GNU
-ignores the request.@footnote{It also
emits a warning in category @samp{font} or @samp{range},
as appropriate.
@xref{Warnings}.}
-
-If @var{font} matches a style name, it is combined with the default
-family to make a resolved font name. If not, @var{font} is assumed
-to be resolved already.
+If the argument is absent or
+@samp{P},
+the formatter selects the previously used typeface
+and makes the current selection the previous one;
+if there is no previous font selection,
+the formatter ignores the request.
@cindex automatic font mounting
@cindex font mounting, automatic
diff --git a/man/groff.7.man b/man/groff.7.man
index 39befadd2..9b042784b 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -3892,12 +3892,11 @@ is
.RB \[lq] DESC \[rq],
if the mounting position is not an abstract style
and no font is mounted there,
-or the mounting position is negative,
-GNU
-.I troff \" GNU
-ignores the request.
+or if the mounting position is negative,
+the formatter ignores the request.
.
-(It also
+(GNU
+.I troff \" GNU
emits a warning in category
.RB \[lq] font \[rq],
or
@@ -3907,6 +3906,13 @@ as appropriate.
See section \[lq]Warnings\[rq] in
.MR @g@troff @MAN1EXT@ .)
.
+If the argument is absent or
+.RB \[lq] P \[rq],
+the formatter selects the previously used typeface
+and makes the current selection the previous one;
+if there is no previous font selection,
+the formatter ignores the request.
+.
Also see
.esc f .
.
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 7fa08c383..dc3d54e91 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -1238,12 +1238,24 @@ or that are interpolated at varying macro nesting
depths.
.
.
.TP
+.BI \[rs]f f
+.TQ
+.BI \[rs]f( ft
+.TQ
.BI \[rs]f\^[ fnt ]
-Select typeface
-.IR fnt ,
-which may be a mounting position,
-abstract style,
-or font name.
+If
+.I f,
+.I ft,
+or
+.I fnt
+names an abstract style or its mounting position,
+GNU
+.I troff \" GNU
+combines it with the default family to make a resolved font name
+before attempting to access it.
+.
+See subsction
+\[lq]Font families, abstract styles, and translation\[rq] above.
.
.BR \[rs]f\^[] ,
.BR \[rs]f\^[P] ,
@@ -2077,6 +2089,20 @@ even if the interpolation context disables compatibility
mode.
.
.
.TP
+.BI .ft\~ fnt
+If
+.I fnt
+names an abstract style or its mounting position,
+GNU
+.I troff \" GNU
+combines it with the default family to make a resolved font name
+before attempting to access it.
+.
+See subsction
+\[lq]Font families, abstract styles, and translation\[rq] above.
+.
+.
+.TP
.BI .hy\~ n
If the argument
.I n
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit