Update of bug #66342 (group groff):

                  Status:                    None => Need Info
             Assigned to:                    None => deri
                 Summary: [gropdf] embed all fonts by default, per current PDF
standard => [PATCH] [gropdf] embed all fonts by default, per current PDF
standard

    _______________________________________________________

Follow-up Comment #1:

Here's a patch.


diff --git a/src/devices/gropdf/gropdf.1.man
b/src/devices/gropdf/gropdf.1.man
index 87ccd025c..a02a3a941 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -64,7 +64,7 @@ .SH Synopsis
 .\" ====================================================================
 .
 .SY gropdf
-.RB [ \-delsW ]
+.RB [ \-dlsW ]
 .RB [ \-F\~\c
 .IR font-directory ]
 .RB [ \-I\~\c
@@ -169,15 +169,6 @@ .SH Options
 .
 .
 .TP
-.B \-e
-Forces
-.I gropdf
-to embed
-.I all
-fonts (even the 14 base PDF fonts).
-.
-.
-.TP
 .BI \-F " dir"
 Prepend directory
 .IR dir /dev name
@@ -1926,7 +1917,7 @@ .SH "Font installation"
 .RS \" two RS calls to get inboard of IP indentation
 .EX
 printf "\[rs]\[rs]f[BSI]Hello, world!\[rs]n" \
-| groff \-T pdf \-P \-e >hello.pdf
+| groff \-T pdf >hello.pdf
 see hello.pdf
 .EE
 .RE
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index db0562c9c..022e6b6f7 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -451,7 +451,7 @@ sub usage
     my $had_error = shift;
     $stream = *STDERR if $had_error;
     print $stream
-"usage: $prog [-delsW] [-F font-directory] [-I inclusion-directory]" .
+"usage: $prog [-dlsW] [-F font-directory] [-I inclusion-directory]" .
 " [--opt option-bits] [-p paper-format] [--pdfver {1.4|1.7}] [-u [cmap-file]]
[-y foundry] [file ...]\n" .
 "usage: $prog {-v | --version}\n" .
 "usage: $prog --help\n";
@@ -468,7 +468,7 @@ my $fd;
 my @fdlist;
 my $frot;
 my $fpsz;
-my $embedall=0;
+my $dummy=0; # backward compatibility for `-e` option
 my $debug=0;
 my $want_help=0;
 my $version=0;
@@ -495,7 +495,7 @@ my $parclntyp=qr/(?:[\d\w]|\([+-]?[\S]{2}|$parcln)/;
 if (!GetOptions('F=s' => \@fdlist, 'I=s' => \@idirs, 'l' => \$frot,
     'p=s' => \$fpsz, 'd!' => \$debug, 'help' => \$want_help, 'pdfver=f' =>
\$PDFver,
     'v' => \$version, 'version' => \$version, 'opt=s' => \$options,
-    'e' => \$embedall, 'y=s' => \$Foundry, 's' => \$stats, 'W' =>
\$warnexit,
+    'e' => \$dummy, 'y=s' => \$Foundry, 's' => \$stats, 'W' => \$warnexit,
     'u:s' => \$unicodemap))
 {
     &usage(1); # had error
@@ -1187,12 +1187,7 @@ sub LoadDownload
            s/#.*$//;
            next if $_ eq '';
            my ($foundry,$name,$file)=split(/\t+/);
-           if (substr($file,0,1) eq '*')
-           {
-               next if !$embedall;
-               $file=substr($file,1);
-           }
-
+           $file=substr($file,1) if (substr($file,0,1) eq '*');
            my $pth=$file;
            $pth=$dir."/$devnm/$file" if substr($file,0,1) ne '/';
 
@@ -3547,7 +3542,6 @@ sub LoadFont
        {
            Warn("unable to embed font file for '$fnt{internalname}'"
            . " ($ofontnm) (missing entry in 'download' file?)")
-           if $embedall;
        }
     }
 


And here's a follow-up patch that takes `-P-e` out of the build system.


diff --git a/doc/doc.am b/doc/doc.am
index 8bd407e31..cebf00814 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -273,16 +273,12 @@ $(DOC_GMP_COVER_PAGE):
$(doc_srcdir)/groff-man-pages-cover.groff.in
 
 # Many pages use tbl, a few use eqn, and soelim(1) uses pic.  We also
 # need groff's FreeEuro font so we can embed it.
-#
-# We embed the fonts (-P-e) to (1) honor the current PDF standard, (2)
-# ensure consistent rendering of the document, and (3) exercise this
-# feature of gropdf.
 doc/groff-man-pages.pdf: $(GROFF_MAN_PAGES_ALL) \
   $(DOC_GMP_COVER_PAGE) \
   eqn pic tbl pdfmom \
   $(TMAC_PACKAGE_MAN) $(TMAC_PACKAGE_MDOC) font/devps/freeeuro.pfa
        $(GROFF_V)$(DOC_PDFMOM) -K utf-8 -pet -mandoc -dHF=HB -rC1 \
-         -rCHECKSTYLE=3 -Tpdf -P-e \
+         -rCHECKSTYLE=3 -Tpdf \
          $(DOC_GMP_COVER_PAGE) \
          $(GROFF_MAN_PAGES1) \
          $(tmac_srcdir)/sv.tmac $(GROFF_MAN_PAGES2) \
diff --git a/m4/groff.m4 b/m4/groff.m4
index 22eafe9a0..b0dd393da 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -308,10 +308,8 @@
   Neither Ghostscript nor URW fonts are available; groff documentation
   thus will not be available in PDF.
 
-  'gropdf' will be able to handle only documents using the standard PDF
-  base 14 fonts, plus the 'EURO' font groff supplies, and font embedding
-  with its '-e' option (accessed via the 'groff' command with the option
-  '-P -e') will not be possible.
+  'gropdf' will generate files employing the standard PDF base 14 fonts,
+  but will be unable to embed them as the current PDF standard requires.
 ])
   fi
 ])




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66342>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to