Hi Thomas,

Sorry for the delay in getting back to this.

At 2024-04-24T10:23:19+0200, Thomas Dupond via wrote:
[...]
> >> > At 2024-04-21T23:52:48-0500, G. Branden Robinson wrote:
> >> > > For mm, what I would do is set up the mounting positions to
> >> > > replace Times with Helvetica.
> >> > > 
> >> > > .fp 1 HR
> >> > > .fp 2 HI
> >> > > .fp 3 HB
> >> > > .fp 4 HBI
[...]
> 
> This question is naive but why isn’t .fam implemented as a wrapping to
> the .fp macro like:
> 
> .de fam
> .fp 1 R \\$1R
> .fp 2 I \\$1I
> .fp 3 B \\$1B
> .fp 4 BI \\$1BI
> ..

As Deri and Peter recently (re-)taught me in Savannah ticket traffic,
groff's style mechanism is actually a flexible one.  These four faces
are conventional, and set up by default on all devices, but you can
define your own style names and assign them mounting positions, and they
will then combine with the default family as R, I, B, and BI do.  In
fact, you can even disable the stock four styles.

mom(7) exercises this mechanism of customizing styles.

See <https://www.schaffter.ca/mom/momdoc/appendices.html#fonts>, section
"The simpler way with mom".

> Of course this doesn’t implement the capability of going to the
> previous font family with an empty .fam call.

Right.  A macro package would have to save the identity of the previous
default family[1] itself, because the formatter exposes no access to
this datum.

Regards,
Branden

[1] I say "default family", and in recent months have updated our
    documentation accordingly, instead of "current family" because of
    the following scenario.

    .fam H \" select Helvetica family
    Hello,
    .ft TR \" select Times roman font
    world!

    What font family is now "current"?  Is the "current family" the one
    we will see on the page when we add a character for troff to format,
    or something else?

    I say "default" family because that's what it is; the family to be
    combined with an _abstract_ style selected by the user (which might
    not happen) as opposed to the identity of the family selected for
    currently formatted text.

Attachment: signature.asc
Description: PGP signature

Reply via email to