groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 57/115: [man]: Preserve user-selected font family.


From: G. Branden Robinson
Subject: [groff] 57/115: [man]: Preserve user-selected font family.
Date: Thu, 1 Jun 2023 10:46:09 -0400 (EDT)

gbranden pushed a commit to branch branden-2022-06-01
in repository groff.

commit 820c1fd561e9a86d6570d597c41453bcb062643f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon May 1 13:59:56 2023 -0500

    [man]: Preserve user-selected font family.
    
    * tmac/an.tmac: When initializing, save the currently selected font
      family as `an*body-family` instead of forcing 'T' (Times, which is the
      formatter's default, even on nroff-mode devices that can't switch
      families).  This change makes the formatter's `-f` option work on
      man(7) documents again (important for Japanese man pages, but there is
      now once again nothing stopping you from viewing man pages in Palatino
      or Helvetica on the 'ps' and 'pdf' devices where these families are
      available).  It also reopens an avenue for rogue pages to affect the
      rendering of unrelated documents later in batch rendering, but there
      are many other, and worse, ways for rogue pages to do damage.  Problem
      introduced by me in commit e0e16d8e65, 15 March 2022.
    
    Fixes <https://savannah.gnu.org/bugs/?64130>.  Thanks to Deri James for
    the report.
---
 ChangeLog    | 20 ++++++++++++++++++++
 tmac/an.tmac |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 862ad532f..c5fe934bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2023-05-13  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       [man]: Preserve user-selected font family.
+
+       * tmac/an.tmac: When initializing, save the currently selected
+       font family as `an*body-family` instead of forcing 'T' (Times,
+       which is the formatter's default, even on nroff-mode devices
+       that can't switch families).  This change makes the formatter's
+       `-f` option work on man(7) documents again (important for
+       Japanese man pages, but there is now once again nothing stopping
+       you from viewing man pages in Palatino or Helvetica on the 'ps'
+       and 'pdf' devices where these families are available).  It also
+       reopens an avenue for rogue pages to affect the rendering of
+       unrelated documents later in batch rendering, but there are many
+       other, and worse, ways for rogue pages to do damage.  Problem
+       introduced by me in commit e0e16d8e65, 15 March 2022.
+
+       Fixes <https://savannah.gnu.org/bugs/?64130>.  Thanks to Deri
+       James for the report.
+
+2023-05-01  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        [man]: Stop `HP` producing excess vertical space.
 
        * tmac/an.tmac (HP): Fix thinko/typo when expanding macro as
diff --git a/tmac/an.tmac b/tmac/an.tmac
index dff0297fe..1ac9550d5 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1294,7 +1294,7 @@ contains unsupported escape sequence
      : \n[an*is-output-terminal]) \
 .  nr an*can-hyperlink 1
 .
-.ds an*body-family T \" Times
+.ds an*body-family \n[.fam]
 .ds an*example-family C \" Courier
 .
 .\" Map monospaced fonts to standard styles for groff's nroff devices.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]