bugGNU roff - Bugs: bug #64130, [man] overrides troff's '-f' option

 
 

bug #64130: [man] overrides troff's '-f' option

Submitter:  Deri James <deri>
Submitted:  Sun 30 Apr 2023 08:57:25 PM UTC
   
 
Category:  Macro man Severity:  4 - Important
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jul 2023 08:53:12 AM UTC, comment #4: 


commit 6e03ad16ea8ed053fbffb5296d2670d6cdb4e931
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   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.


G. Branden Robinson <gbranden>
Group administrator
Mon 08 May 2023 12:46:53 AM UTC, comment #3: 

Kicking Severity up to Important since this is a regression from groff 1.22.4.

G. Branden Robinson <gbranden>
Group administrator
Sun 07 May 2023 04:16:36 AM UTC, comment #2: 
G. Branden Robinson <gbranden>
Group administrator
Mon 01 May 2023 11:49:33 AM UTC, comment #1: 

This bug also unnecessarily frustrates people who simply want to use a different font family to view the man page, like Palatino ('-fP') or Helvetica ('-fH).

Also those are easier for me to test, and postpone the day when I need to sweat the issue of changing the default family in certain localization files (ja.tmac, zh.tmac).

The fix is a one-liner.


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.


G. Branden Robinson <gbranden>
Group administrator
Sun 30 Apr 2023 08:57:25 PM UTC, original submission:  

When viewing japanese man pages it used to be necessary to pass the flag -f setting the default font family to a Japanese font which affected both the body of a man page and the headings, in bold, when viewing the grops output of a japanese man page. In 1.23.0-rc4 this no longer works, for headings, you have to set the HF register to the Japanese bold font.

It seems that an.tmac sets the font family to T (for headings), even if the user has changed the default family with the -f flag.

Deri James <deri>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by deri (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-10 gbranden StatusReady for Merge Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-05-08 gbranden Severity3 - Normal 4 - Important
    2023-05-07 gbranden StatusIn Progress Ready for Merge
    2023-05-01 gbranden StatusNone In Progress
        Assigned toNone gbranden
        Summaryan.tmac does not honour -f family for headings - assumes T family. [man] overrides troff's '-f' option

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code