bugGNU roff - Bugs: bug #51362, add a synonym for the font...

 
 

bug #51362: add a synonym for the font "CW"

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Sun 02 Jul 2017 09:03:37 PM UTC
   
 
Category:  Macro man Severity:  1 - Wish
Item Group:  Feature change Status:  Rejected
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 30 Mar 2023 04:51:43 PM UTC, comment #7: 

Dropping patch annotation for rejected ticket.

I do note that the man.local and mdoc.local files to be shipped with groff 1.23.0 have the following.


.\" "CW" is not a portable font name, but some man pages use it anyway.
.\" Uncomment this to suppress warnings produced by such pages.  This
.\" test remaps the font to roman ("R") on nroff (terminal) devices. You
.\" might prefer to remap it to bold ("B") instead.
.\" .if n .ftr CW R


G. Branden Robinson <gbranden>
Group administrator
Sat 05 Mar 2022 10:59:04 PM UTC, comment #6: 

I think Ingo and I rejected this a little more strongly than we needed to.

I have found that there is a scenario where one has to deal with fonts named "CW" and in that event you'll have to deal with one named "CWI" as well, and that is for coping with documents prepared for the old-school TeX font repertoire.  I've done some small tweaks along these lines.

Apart from that, it's a bad idea.  AT&T Research Unix has some macros and maybe even fonts named "CW" in the 1980s (we support a "CW" macro in groff ms(7), for example), but since four styles of Courier were available even in the original Adobe PostScript Type 1 set of 13 base fonts, also a product of the 1980s, I don't see any reason to extrapolate CW/CWI handling outside of areas where we need to make sure things work for the 'dvi' output device.

As an example of clumsy practice we should not bother to emulate, I give you a quote from the "CHANGES_1993" file of Documenter's Workbench troff 3.3.

> 19: Copied CW to CB in the devpcl and devi300 font tables - so man pages print without generating troff warnings about missing fonts.


Apparently "CW" was a synonym for "C", or what groff calls "CR".  1980s troff seems to have only haltingly picked up the concept of font families.

groff adopted a better, more orthogonal approach early on, perhaps from day one, and we shouldn't muddy those waters.

While I'm here I'll observe that DWB troff also adopted, or possibly copied from AT&T Research Unix troff, a convention of using the letter "X" to indicate the bold-italic style.  This was another bad idea that we should not mollycoddle.

G. Branden Robinson <gbranden>
Group administrator
Thu 06 Aug 2020 03:11:04 PM UTC, comment #5: 


comment #4:

> The bad practice of requesting \f(CW or .ft CW in man(7) pages is widespread enough that mandoc(1) has been supporting it for backward compatibility for many years.  In practice, \f(CW is clearly used more often than the more logical \f(CR (which mandoc also supports, but nor for such a long time).  That said, your point seems fair to me that there is nothing wrong with warning authors about this particular kind of bad practice.
>
> Support for \f[C] is clearly not needed.  I don't recall encountering that in a manual page at all, ever.


My suspicion is that this was an ms-ism that got picked up by man page writers, because ms has had a .CW macro for as far back as I'm aware (though I haven't done a history of it the way I did for man(7)).  I guess at some point the typesetters at Bell Labs had a Courier-ish font but only roman styling for it.

If I'm right, this led to an unfortunate failing of imagination.

For documents targeting -Tdvi it's a little more understandable because TeX long had its own font universe, and CW and CWI were their (only?) choices for something monospaced.

G. Branden Robinson <gbranden>
Group administrator
Thu 23 Jul 2020 02:11:24 PM UTC, comment #4: 

The bad practice of requesting \f(CW or .ft CW in man(7) pages is widespread enough that mandoc(1) has been supporting it for backward compatibility for many years.  In practice, \f(CW is clearly used more often than the more logical \f(CR (which mandoc also supports, but nor for such a long time).  That said, your point seems fair to me that there is nothing wrong with warning authors about this particular kind of bad practice.

Support for \f[C] is clearly not needed.  I don't recall encountering that in a manual page at all, ever.

Ingo Schwarze <schwarze>
Group Member
Thu 23 Jul 2020 01:21:15 PM UTC, comment #3: 

With #51364 now resolved, I don't think this is necessary, for the reasons articulated in in this ticket's history and recent commits.


Do we really want this?  IMO it's not terribly portable for man pages to ask for fonts that they can't get via the man macros, and when people try, they get it wrong.

Our own man page corpus is clean of CW font shenanigans now; with the recent commit 97af31602991f330eed7b4f31354d5c34a729336, other people will get them and can clean up their own pages accordingly.  (Perhaps after complaining on the Internet first--c'est la vie.)


G. Branden Robinson <gbranden>
Group administrator
Tue 21 Nov 2017 08:20:19 AM UTC, comment #2: 

Do we really want this?  IMO it's not terribly portable for man pages to ask for fonts that they can't get via the man macros, and when people try, they get it wrong.

With the patch for 51364, maybe we should let the problem of suppressing the missing font warnings bubble up to man-db?

G. Branden Robinson <gbranden>
Group administrator
Thu 13 Jul 2017 10:36:27 PM UTC, comment #1: 

  Made an augmented patch, added font "C" to the previous out-of-date patch.


From 09365cb56c7fe5a2e3a41422914cd557114456d3 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Thu, 13 Jul 2017 22:31:20 +0000
Subject: [PATCH] an-ext.tmac: Make aliases for two font names, "C" and "CW"

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 tmac/an-ext.tmac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tmac/an-ext.tmac b/tmac/an-ext.tmac
index 740d73f4..97ec4ff0 100644
--- a/tmac/an-ext.tmac
+++ b/tmac/an-ext.tmac
@@ -37,6 +37,8 @@
 .
 .\" Map mono-width fonts to standard fonts for groff's TTY device.
 .if n \{\
+.  do ftr  C R
+.  do ftr CW R
 .  do ftr CR R
 .  do ftr CI I
 .  do ftr CB B
--
2.13.2


Bjarni Ingi Gislason <bjarniig>
Sun 02 Jul 2017 09:03:37 PM UTC, original submission:  

From 0bf7a9e28c2033dc3d56fe020c05631e7ba63b6b Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sun, 2 Jul 2017 20:39:47 +0000
Subject: [PATCH] Add a synonym for the "CW" font for "tty" devices

  Some man-pages want to use the name "CW" for a constant width font, but
that font is only available for the groff's device "dvi".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 tmac/an-ext.tmac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tmac/an-ext.tmac b/tmac/an-ext.tmac
index 740d73f4..ae9ac8d5 100644
--- a/tmac/an-ext.tmac
+++ b/tmac/an-ext.tmac
@@ -38,6 +38,7 @@
 .\" Map mono-width fonts to standard fonts for groff's TTY device.
 .if n \{\
 .  do ftr CR R
+.  do ftr CW R
 .  do ftr CI I
 .  do ftr CB B
 .\}
--
2.11.0


Bjarni Ingi Gislason <bjarniig>

 

(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 schwarze (Posted a comment)
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by bgarrigues (Updated the item)
  • -email is unavailable- added by bjarniig (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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-30 gbranden Summary[PATCH] add a synonym for the font &quot;CW&quot; add a synonym for the font "CW"
    2022-03-05 gbranden Summary[PATCH]: Add a synonym for the font &quot;CW&quot; [PATCH] add a synonym for the font "CW"
    2020-07-23 gbranden Severity2 - Minor 1 - Wish
        Item GroupNone Feature change
        StatusNeed Info Rejected
        Open/ClosedOpen Closed
    2017-11-21 gbranden Summary[Patch]: Add a synonym for the font &quot;CW&quot; [PATCH]: Add a synonym for the font "CW"
    2017-11-21 gbranden StatusIn Progress Need Info
    2017-11-21 gbranden StatusNone In Progress
        Assigned toNone gbranden
    2017-09-01 bgarrigues CategoryNone Macro man
        Severity3 - Normal 2 - Minor

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code