bugGNU roff - Bugs: bug #64353, [PATCH] [troff,drivers] deprecate...

 
 

bug #64353: [PATCH] [troff,drivers] deprecate 'f' drawing command

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Tue 27 Jun 2023 06:14:03 AM UTC
   
 
Category:  General Severity:  1 - Wish
Item Group:  Feature change Status:  Postponed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 12 Jul 2023 08:56:56 PM UTC, comment #7: 

No ticket. The earliest reference to the "new features" are in the last paragraph in original TODO file in the gropdf directory. I think they are all done (or irrelevent) now, only took me 10+ years! A new TODO would contain the aspiration to handle ttf/otf/woff fonts natively in groff. The microsoft spec for ttf is a mere 3030 page pdf and the ISO-OpenType spec is another 640 pages, so perhaps a bit more than a weekend's hacking! And then gropdf, as I originally planned it, will be complete.

Deri James <deri>
Group Member
Wed 12 Jul 2023 05:46:03 PM UTC, comment #6: 


comment #5:

> This is fine, but it should wait until gropdf has been cherry picked from my branch to master, when Branden is ready. I hope I won't have to maintain two different versions for long, for example, Colin Watson's reproducible build patch would not apply against the new gropdf, I had to roll my own.


Fair enough.  Do we have a ticket requesting any of the features in the new gropdf, or has your imagination simply raced ahead of those of our users who have troubled themselves with Savannah?  :)

I ask only because I'm reassigning to myself and setting the status to "Postponed".  If there is a ticket this can depend on, I'd like to mention it.  If not, it's okay, I'll be strongly aware of your branch until we get it merged.

G. Branden Robinson <gbranden>
Group administrator
Wed 12 Jul 2023 05:42:43 PM UTC, comment #5: 

This is fine, but it should wait until gropdf has been cherry picked from my branch to master, when Branden is ready. I hope I won't have to maintain two different versions for long, for example, Colin Watson's reproducible build patch would not apply against the new gropdf, I had to roll my own.

Deri James <deri>
Group Member
Wed 12 Jul 2023 05:20:54 PM UTC, comment #4: 

Reminder that I could still use some feedback on this.

comment #2:

> diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
> index e86644da5..2067f0a19 100644
> --- a/src/devices/gropdf/gropdf.pl
> +++ b/src/devices/gropdf/gropdf.pl
> @@ -3140,6 +3140,7 @@ sub do_D
>      }
>      elsif ($Dcmd eq 'f')
>      {
> +       Warn("'f' drawing command is obsolete; use 'Fg' instead");
>         my $mcmd=substr($par,0,1);
>
>         $par=substr($par,1);


>
> Deri, can you let me know if the foregoing patch to gropdf is acceptable?

G. Branden Robinson <gbranden>
Group administrator
Fri 30 Jun 2023 01:13:08 AM UTC, comment #3: 

Email discussion at http://lists.gnu.org/r/groff/2023-06/msg00174.html and other links in the thread

Dave <barx>
Group Member
Wed 28 Jun 2023 02:42:11 PM UTC, comment #2: 


diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index e86644da5..2067f0a19 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -3140,6 +3140,7 @@ sub do_D
     }
     elsif ($Dcmd eq 'f')
     {
+       Warn("'f' drawing command is obsolete; use 'Fg' instead");
        my $mcmd=substr($par,0,1);

        $par=substr($par,1);


Deri, can you let me know if the foregoing patch to gropdf is acceptable?

G. Branden Robinson <gbranden>
Group administrator
Wed 28 Jun 2023 02:37:38 PM UTC, comment #1: 

Here's Werner's original deprecation notice.


67d234991b NEWS    (Werner LEMBERG      2003-02-14 11:30:13 +0000  922)   \D'f ...' is deprecated since it depends on the horizontal resolution of
67d234991b NEWS    (Werner LEMBERG      2003-02-14 11:30:13 +0000  923)   the output device (given with the `hor' parameter in the DESC file).
87edb52555 NEWS    (Werner LEMBERG      2003-03-10 21:51:55 +0000  924)   Use the new \D'Fg ...' escape instead.


groff 1.19 was released on about 2003-04-28, so presumably the one or two people who read the NEWS file noticed this then.


diff --git a/src/libs/libdriver/input.cpp b/src/libs/libdriver/input.cpp
index 821b526bd..97d90d291 100644
--- a/src/libs/libdriver/input.cpp
+++ b/src/libs/libdriver/input.cpp
@@ -1361,6 +1361,7 @@ parse_D_command()
     }
   case 'f':                    // Df: set fill gray; obsoleted by DFg
     {
+      error("'f' drawing command is obsolete; use 'Fg' instead");
       IntArg arg = get_integer_arg();
       if ((arg >= 0) && (arg <= 1000)) {
        // convert arg and treat it like DFg
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index e797e2200..cc0b59f38 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8754,6 +8754,9 @@ static node *read_draw_node()
            error("even number of arguments needed for spline");
          break;
        case 'f':
+         error("'f' drawing command is obsolete;"
+               " use 'Fg' drawing command, 'M' escape sequence,"
+               " or 'fcolor' request instead");
          if (npoints != 1 || !no_last_v) {
            error("one argument needed for gray shade");
            npoints = 1;


G. Branden Robinson <gbranden>
Group administrator
Tue 27 Jun 2023 06:14:03 AM UTC, original submission:  

We've deprecated this for over 20 years but not been very loud about it.


  Extended drawing commands
    GNU pic does not produce troff escape sequences employing these
    extensions if its -n option is given.

    Df n
        Set the shade of gray used to fill geometric objects to n, which
        must be an integer.  0 corresponds to white and 1000 to black.
        A grayscale ramp spans the two.  A value outside this range uses
        the stroke color as the fill color.  The fill color is opaque.
        Normally the default is black, but some drivers may provide a
        way of changing this.  Df is obsolete since 2002, superseded by
        DFg below.

        The corresponding \D'f' escape sequence should not be used: its
        argument is rounded to an integer multiple of the horizontal
        motion quantum, which can limit the precision of n.


Get louder.  We want the formatter to howl about these as escape sequences and the output drivers to howl about them as commands.



G. Branden Robinson <gbranden>
Group administrator

 

(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 deri (Posted a comment)
  • -email is unavailable- added by gbranden (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-12 gbranden StatusNeed Info Postponed
        Assigned toderi gbranden
    2023-06-30 barx Carbon-CopyRemoved 93119 -
    2023-06-28 gbranden StatusIn Progress Need Info
        Assigned togbranden deri
    2023-06-28 gbranden StatusNone In Progress
        Assigned toNone gbranden
        Summary[troff,drivers] deprecate 'f' drawing command [PATCH] [troff,drivers] deprecate 'f' drawing command
    2023-06-27 gbranden Severity3 - Normal 1 - Wish
    2023-06-27 gbranden Item GroupNone Feature change

    Back to the top

    Powered by Savane 3.13-ec04.
    Corresponding source code