groff
[Top][All Lists]
Advanced

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

gropdf paper format diagnostic message and rev{i, er}sion plans (was: gr


From: G. Branden Robinson
Subject: gropdf paper format diagnostic message and rev{i, er}sion plans (was: gropdf landscape orientation support)
Date: Fri, 18 Nov 2022 11:29:46 -0600

Hi Deri,

I'm about to spend a good deal of my weekend out of pocket, so I might
not be able to follow up on the landscape/rotation discussion right
away.  But I did want to go ahead and run something by you that we agree
on in principle.

At 2022-11-18T15:46:24+0000, Deri wrote:
> Invalid paper sizes are silently ignored, and I agree a warning like
> grops is needed.

I have a couple of commits pending in my working copy; please advise if
you have any objections or corrections.  I don't expect to push until we
reach agreement on the font embedding failure exit status issue.

https://lists.gnu.org/archive/html/groff/2022-11/msg00121.html

So that you aren't surprised, enabling such a failure exit status _and_
reverting my other commits will cause build failures (because
groff-man-pages.pdf will be produced without the FreeEuro font
embedded).

commit 7e5d433ba5ddc2389986a5c02f91eb57fc1de47d
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Tue Nov 8 21:03:49 2022 +0000

    [gropdf]: Cater for invalid entries in download file.

    * src/devices/gropdf/gropdf.pl: Test if path in the download
    file points to a readable file. Also change order so that the
    first valid entry is used as the font to embed. This replaces
    previous order where last found entry is used.

    This change is discussed in <https://savannah.gnu.org/bugs/?62950>.

I therefore would expect to revert the above along with three of
mine[1][2][3]; that will turn the tree green again and give us breathing
room to hammer the issues out on a feature branch as Ralph suggested.

Seperable gropdf issues, like these:

commit 3e1c246e22746ce59106c70b2912e9f3472116cc
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Wed Nov 16 22:02:49 2022 +0000

    [gropdf]: Rotate MediaBox if '-p' arg L-suffixed.

    * src/devices/gropdf/gropdf.pl: If the argument to the paper format
      option '-p' matches a recognized format but includes a trailing 'L' or
      'l' ("legalL" or "a4l", for example), rotate the document's MediaBox.

commit 0ce521b5fce66f8065f1b7d0dc721fd44d8ae40b
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Wed Nov 16 22:02:49 2022 +0000

    [gropdf]: Fix Savannah #63380.

    * src/devices/gropdf/gropdf.pl: Fix incorrect hotspot placement if page
      is in landscape orientation.

      (FixRect): Perform coordinate transform if page is rotated.

      (Rotate): New function performs relevant trigonometry.

    Fixes <https://savannah.gnu.org/bugs/?63380>.  Thanks to Blake McBride
    for the report.

...would not be affected and would stay on master (technically, they're
not there yet because I haven't pushed my working copy--but they will be
by the time I expect to do the revert/branch dance).

Anyway, here are the fingers-crossed uncontroversial changes I mentioned
at the top of this message.

commit 49aff9b91d53fcddd9e1fffb0165c1e772929244 (HEAD -> master)
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Nov 18 11:09:17 2022 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Fri Nov 18 11:09:17 2022 -0600

    [gropdf]: Warn on unrecognized paper format.

    * src/devices/gropdf/gropdf.pl: Throw warning if paper format is
      unrecognized.

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index c2745fb17..b1e274b95 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -323,6 +323,10 @@ elsif (substr($papersz,-1) eq 'l' and 
exists($ppsz{substr($papersz,0,-1)}))
     # Note 'legal' ends in 'l' but will be caught above
     
@defaultmb=@mediabox=(0,0,$ppsz{substr($papersz,0,-1)}->[1],$ppsz{substr($papersz,0,-1)}->[0]);
 }
+else
+{
+    Warn("ignoring unrecognized paper format '$papersz'");
+}

 my (@dt)=localtime($ENV{SOURCE_DATE_EPOCH} || time);
 my $dt=PDFDate(\@dt);

commit 117152f87c58b861563eab3aadccf2170f93ead7
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Nov 18 11:07:50 2022 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Fri Nov 18 11:07:50 2022 -0600

    [gropdf]: Tweak diagnostic message format.

    * src/devices/gropdf/gropdf.pl (Msg): Align more closely with diagnostic
      message format prescribed by GNU Coding Standards: emit space (only)
      prior to message severity.

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index a2b34c8fd..c2745fb17 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -2289,7 +2289,8 @@ sub Msg
     my ($fatal,$msg)=@_;

     print STDERR "$prog:";
-    print STDERR "$env{SourceFile}: " if exists($env{SourceFile});
+    print STDERR "$env{SourceFile}:" if exists($env{SourceFile});
+    print STDERR " ";

     if ($fatal)
     {

Regards,
Branden

[1] https://lists.gnu.org/archive/html/groff-commit/2022-11/msg00092.html
[2] https://lists.gnu.org/archive/html/groff-commit/2022-11/msg00093.html
[3] https://lists.gnu.org/archive/html/groff-commit/2022-11/msg00094.html

Attachment: signature.asc
Description: PGP signature


reply via email to

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