groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog font/devpdf/Foundry.in font/dev...


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog font/devpdf/Foundry.in font/dev...
Date: Thu, 17 Jan 2013 12:38:17 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     13/01/17 12:38:16

Modified files:
        .              : ChangeLog 
        font/devpdf    : Foundry.in 
        font/devpdf/util: BuildFoundries.pl 
        src/devices/gropdf: gropdf.man gropdf.pl 
        tmac           : pdf.tmac 

Log message:
        * src/devices/gropdf/gropdf.pl (do_x, do_p, do_s, Set_LWidth): The
        grops driver defaults to round linecaps and linejoins, gropdf
        incorrectly used butt caps and miter joins.
        
        (Since the MOM package expects to use butt caps and miter joins
        (emitting the necessary postscript code to change the caps and
        joins), gropdf now parses the same postscript commands.)
        
        * src/devices/gropdf/gropdf.man: Document the handling of linecaps
        and linejoins.
          
        * tmac/pdf.tmac (pdfbookmark): Fix bug where the current
        PDFOUTLINE.FOLDLEVEL may not be honoured if warnings of the type
        
          macro warning: adjusted level n bookmark; should be <= n
        
        Added copyright and mention debt owed to Keith Marshall for original
        `pdfmark.tmac', upon which `pdf.tmac' is largely based.
        
        * font/devpdf/Foundry.in, font/devpdf/util/BuildFoundries.pl
        (LocateFile): The font for EURO had the wrong entry in the
        `download' file (it pointed to The font in the build directory,
        which is wrong).  It has always been permissable to include a path
        along with the font name in the Foundry file, but until now the font
        had to exist to be valid.  It is now permitted to start the path
        with an asterisk which tells BuildFoundry to use the path/filename
        in the download file without checking if the font exists.  This
        allows the font to be found in `../devps' even though it is not
        there during the build (if source and build are different), but will
        be there after the install.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1378&r2=1.1379
http://cvs.savannah.gnu.org/viewcvs/groff/font/devpdf/Foundry.in?cvsroot=groff&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/groff/font/devpdf/util/BuildFoundries.pl?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.man?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.pl?cvsroot=groff&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/pdf.tmac?cvsroot=groff&r1=1.4&r2=1.5

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1378
retrieving revision 1.1379
diff -u -b -r1.1378 -r1.1379
--- ChangeLog   13 Jan 2013 10:16:01 -0000      1.1378
+++ ChangeLog   17 Jan 2013 12:38:16 -0000      1.1379
@@ -1,3 +1,36 @@
+2013-01-14  Deri James  <address@hidden>
+
+       * src/devices/gropdf/gropdf.pl (do_x, do_p, do_s, Set_LWidth): The
+       grops driver defaults to round linecaps and linejoins, gropdf
+       incorrectly used butt caps and miter joins.
+
+       (Since the MOM package expects to use butt caps and miter joins
+       (emitting the necessary postscript code to change the caps and
+       joins), gropdf now parses the same postscript commands.)
+
+       * src/devices/gropdf/gropdf.man: Document the handling of linecaps
+       and linejoins.
+         
+       * tmac/pdf.tmac (pdfbookmark): Fix bug where the current
+       PDFOUTLINE.FOLDLEVEL may not be honoured if warnings of the type
+
+         macro warning: adjusted level n bookmark; should be <= n
+
+       Added copyright and mention debt owed to Keith Marshall for original
+       `pdfmark.tmac', upon which `pdf.tmac' is largely based.
+
+       * font/devpdf/Foundry.in, font/devpdf/util/BuildFoundries.pl
+       (LocateFile): The font for EURO had the wrong entry in the
+       `download' file (it pointed to The font in the build directory,
+       which is wrong).  It has always been permissable to include a path
+       along with the font name in the Foundry file, but until now the font
+       had to exist to be valid.  It is now permitted to start the path
+       with an asterisk which tells BuildFoundry to use the path/filename
+       in the download file without checking if the font exists.  This
+       allows the font to be found in `../devps' even though it is not
+       there during the build (if source and build are different), but will
+       be there after the install.
+
 2013-01-13  Werner LEMBERG  <address@hidden>
 
        [eqn] Fix display of matrices in nroff output.
@@ -939,7 +972,7 @@
 
        * doc/webpage.ms: Fix rendering of title image.
 
-Copyright 2011-2012
+Copyright 2011-2013
   Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,

Index: font/devpdf/Foundry.in
===================================================================
RCS file: /cvsroot/groff/groff/font/devpdf/Foundry.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- font/devpdf/Foundry.in      20 Sep 2012 07:48:28 -0000      1.2
+++ font/devpdf/Foundry.in      17 Jan 2013 12:38:16 -0000      1.3
@@ -37,7 +37,7 @@
 CBI|Y||||NimbusMonL-BoldObli!n022024l.pfb
 CI|Y||||NimbusMonL-ReguObli!n022023l.pfb
 CR|Y||||NimbusMonL-Regu!n022003l.pfb
-EURO|N||||freeeuro.pfa
+EURO|N||||*../devps/freeeuro.pfa
 HB|Y||||NimbusSanL-Bold!n019004l.pfb
 HBI|Y||||NimbusSanL-BoldItal!n019024l.pfb
 HI|Y||||NimbusSanL-ReguItal!n019023l.pfb

Index: font/devpdf/util/BuildFoundries.pl
===================================================================
RCS file: /cvsroot/groff/groff/font/devpdf/util/BuildFoundries.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- font/devpdf/util/BuildFoundries.pl  7 Jan 2013 09:04:46 -0000       1.4
+++ font/devpdf/util/BuildFoundries.pl  17 Jan 2013 12:38:16 -0000      1.5
@@ -219,6 +219,7 @@
     my $path=shift;
     my $files=shift;
     my $tryafm=shift;
+    return(substr($files,1)) if substr($files,0,1) eq '*';
 
     foreach my $file (split('!',$files))
     {

Index: src/devices/gropdf/gropdf.man
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.man,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/devices/gropdf/gropdf.man       20 May 2012 13:58:10 -0000      1.3
+++ src/devices/gropdf/gropdf.man       17 Jan 2013 12:38:16 -0000      1.4
@@ -1,5 +1,5 @@
 .ig
-Copyright (C) 2011-2012
+Copyright (C) 2011-2013
   Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
@@ -620,7 +620,7 @@
 .B \[rs]X
 escape sequences supported by
 .B grops.
-Specifically it supports:-
+Specifically, the following is supported.
 .
 .TP
 .B "\[rs]X'ps: invis'"
@@ -647,7 +647,32 @@
 to restore after rotation.
 .
 .TP
-.BI "\[rs]X'ps: ... pdfmark'"
+.BI "\[rs]X'ps: exec " "n " "setlinejoin'"
+where
+.I n
+can be one of the following values.
+.IP
+0 = Miter join
+.br
+1 = Round join
+.br
+2 = Bevel join
+.
+.TP
+.BI "\[rs]X'ps: exec " "n " "setlinecap'"
+where
+.I n
+can be one of the following values.
+.IP
+0 = Butt cap
+.br
+1 = Round cap, and
+.br
+2 = Projecting square cap
+.
+.LP
+.TP
+.B "\[rs]X'ps: ... pdfmark'"
 All the
 .I pdfmark
 macros installed by using

Index: src/devices/gropdf/gropdf.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- src/devices/gropdf/gropdf.pl        4 Jan 2013 07:28:42 -0000       1.11
+++ src/devices/gropdf/gropdf.pl        17 Jan 2013 12:38:16 -0000      1.12
@@ -4,7 +4,7 @@
 #      Deri James      : 4th May 2009
 #
 
-# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #      Written by Deri James <address@hidden>
 #
 # This file is part of groff.
@@ -56,6 +56,8 @@
 my $cftsz=10;  # Current font sz
 my $cft;       # Current Font
 my $lwidth=1;  # current linewidth
+my $linecap=1;
+my $linejoin=1;
 my $textcol='';        # Current groff text
 my $fillcol='';        # Current groff fill
 my $curfill='';        # Current PDF fill
@@ -693,6 +695,18 @@
                $stream.="Q\n";
                $InPicRotate=0;
            }
+           elsif ($par=~m/exec (\d) setlinejoin/)
+           {
+               IsGraphic();
+               $linejoin=$1;
+               $stream.="$linejoin j\n";
+           }
+           elsif ($par=~m/exec (\d) setlinecap/)
+           {
+               IsGraphic();
+               $linecap=$1;
+               $stream.="$linecap J\n";
+           }
            elsif ($par=~m/\[(.+) pdfmark/)
            {
                my $pdfmark=$1;
@@ -2311,7 +2325,7 @@
     $objct+=1;
     $cpage=$obj[$cpageno]->{DATA};
     $pages->{'Count'}++;
-    $stream="q 1 0 0 1 0 0 cm\n";
+    $stream="q 1 0 0 1 0 0 cm\n$linejoin J\n$linecap j\n";
     $mode='g';
     $curfill='';
 #    @address@hidden;
@@ -2420,6 +2434,7 @@
     {
        PutLine();
        $cftsz=$par;
+       Set_LWidth() if $lwidth < 1;
 #              $stream.="/F$cft $cftsz Tf\n";
        $fontchg=1;
        $widtbl=CacheWid($cft);
@@ -2427,9 +2442,17 @@
     else
     {
        $cftsz=$par;
+       Set_LWidth() if $lwidth < 1;
     }
 }
 
+sub Set_LWidth
+{
+    IsGraphic();
+    $stream.=((($desc{res}/(72*$desc{sizescale}))*$linewidth*$cftsz)/1000)." 
w\n";
+    return;
+}
+
 sub do_m
 {
     # Groff uses /m[] for text & graphic stroke, and /M[] (DF?) for graphic 
fill.
@@ -2583,7 +2606,7 @@
     }
     elsif ($Dcmd eq 'p' or $Dcmd eq 'P')
     {
-       # B-Spline
+       # Polygon
        my (@p)=split(' ',$par);
        my ($nxpos,$nypos);
 

Index: tmac/pdf.tmac
===================================================================
RCS file: /cvsroot/groff/groff/tmac/pdf.tmac,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- tmac/pdf.tmac       20 May 2012 13:58:10 -0000      1.4
+++ tmac/pdf.tmac       17 Jan 2013 12:38:16 -0000      1.5
@@ -1,5 +1,32 @@
-.\" pdf.tmac
-.\"
+.ig
+
+pdf.tmac
+
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
+      Written by Deri James <address@hidden>
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Author's Note
+=============
+
+Much of the code in this macro has come from the excellent original work by
+Keith Marshall (see attribution in the pdfmark.tmac file). I, however,
+am solely responsible for any bugs I may have introduced into this file.
+..
 .mso ps.tmac
 .
 .de pdf:SS
@@ -196,6 +223,7 @@
 .      ie \\n[pdf:bm.abslev]>\\n[pdf:bm.nl] \{\
 .        pdf:warn adjusted level \\n[pdf:bm.abslev] bookmark; should be <= 
\\n[pdf:bm.nl]
 .        nr pdf:bm.abslev 0+\\n[pdf:bm.nl]
+.        if \\n[pdf:bm.abslev]-1==\\n[PDFOUTLINE.FOLDLEVEL] .nr pdf:bm.lev 
\\n[pdf:bm.abslev]*-1
 .      \}
 .      el .nr pdf:bm.nl \\n[pdf:bm.abslev]
 .      if \\n[pdf:bm.lev]<0 .nr pdf:bm.abslev \\n[pdf:bm.abslev]*-1



reply via email to

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