r1493 - in packages/libpdf-api2-perl/branches/upstream/current: .
lib/PDF/API2 lib/PDF/API2/Resource/CIDFont/TrueType
Gunnar Wolf
gwolf at costa.debian.org
Fri Nov 11 23:19:41 UTC 2005
Author: gwolf
Date: 2005-11-11 23:19:40 +0000 (Fri, 11 Nov 2005)
New Revision: 1493
Modified:
packages/libpdf-api2-perl/branches/upstream/current/CHANGELOG
packages/libpdf-api2-perl/branches/upstream/current/META.yml
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Page.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm
Log:
Load /tmp/tmp.FKolK4/libpdf-api2-perl-0.50 into
packages/libpdf-api2-perl/branches/upstream/current.
Modified: packages/libpdf-api2-perl/branches/upstream/current/CHANGELOG
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/CHANGELOG 2005-11-11 23:10:53 UTC (rev 1492)
+++ packages/libpdf-api2-perl/branches/upstream/current/CHANGELOG 2005-11-11 23:19:40 UTC (rev 1493)
@@ -1,3 +1,17 @@
+2005-11-02 19:21 fredo
+
+ * lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm: added kerning
+ lookup strategy
+
+2005-11-02 19:18 fredo
+
+ * lib/PDF/API2/Page.pm: added get_(crop/bleed/trim/art)box methods
+
+2005-10-22 21:56 fredo
+
+ * lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm: added mor
+ agressive kerning strategy
+
2005-10-21 23:42 fredo
* lib/PDF/API2/Basic/PDF/File.pm: speedup reading large
Modified: packages/libpdf-api2-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/META.yml 2005-11-11 23:10:53 UTC (rev 1492)
+++ packages/libpdf-api2-perl/branches/upstream/current/META.yml 2005-11-11 23:19:40 UTC (rev 1493)
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: PDF-API2
-version: 0.49
+version: 0.50
version_from: lib/PDF/API2/Version.pm
installdirs: site
requires:
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Page.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Page.pm 2005-11-11 23:10:53 UTC (rev 1492)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Page.pm 2005-11-11 23:19:40 UTC (rev 1493)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Page.pm,v 1.14 2005/08/06 20:59:10 fredo Exp $
+# $Id: Page.pm,v 1.15 2005/11/02 18:18:20 fredo Exp $
#
#=======================================================================
package PDF::API2::Page;
@@ -52,7 +52,7 @@
use POSIX qw(floor ceil);
use Math::Trig;
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.14 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/08/06 20:59:10 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.15 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/11/02 18:18:20 $
}
@@ -186,6 +186,29 @@
$self;
}
+=item ($llx, $lly, $urx, $ury) = $page->get_cropbox
+
+Gets the cropbox based one best estimates or the default.
+
+=cut
+
+sub get_cropbox
+{
+ my ($self) = @_;
+ my $media = [ 0, 0, 612, 792 ];
+ foreach my $mediatype (qw[CropBox BleedBox TrimBox ArtBox MediaBox])
+ {
+ my $mediaobj = undef;
+ if($mediaobj = $self->find_prop($mediatype))
+ {
+ $media = [ map{ $_->val } $mediaobj->elementsof ];
+ last;
+ }
+ }
+
+ return(@{$media});
+}
+
=item $page->bleedbox $w, $h
=item $page->bleedbox $llx, $lly, $urx, $ury
@@ -214,6 +237,29 @@
$self;
}
+=item ($llx, $lly, $urx, $ury) = $page->get_bleedbox
+
+Gets the bleedbox based one best estimates or the default.
+
+=cut
+
+sub get_bleedbox
+{
+ my ($self) = @_;
+ my $media = [ 0, 0, 612, 792 ];
+ foreach my $mediatype (qw[BleedBox TrimBox ArtBox MediaBox CropBox])
+ {
+ my $mediaobj = undef;
+ if($mediaobj = $self->find_prop($mediatype))
+ {
+ $media = [ map{ $_->val } $mediaobj->elementsof ];
+ last;
+ }
+ }
+
+ return(@{$media});
+}
+
=item $page->trimbox $w, $h
=item $page->trimbox $llx, $lly, $urx, $ury
@@ -240,6 +286,29 @@
$self;
}
+=item ($llx, $lly, $urx, $ury) = $page->get_trimbox
+
+Gets the trimbox based one best estimates or the default.
+
+=cut
+
+sub get_trimbox
+{
+ my ($self) = @_;
+ my $media = [ 0, 0, 612, 792 ];
+ foreach my $mediatype (qw[TrimBox ArtBox MediaBox CropBox BleedBox])
+ {
+ my $mediaobj = undef;
+ if($mediaobj = $self->find_prop($mediatype))
+ {
+ $media = [ map{ $_->val } $mediaobj->elementsof ];
+ last;
+ }
+ }
+
+ return(@{$media});
+}
+
=item $page->artbox $w, $h
=item $page->artbox $llx, $lly, $urx, $ury
@@ -268,6 +337,29 @@
$self;
}
+=item ($llx, $lly, $urx, $ury) = $page->get_artbox
+
+Gets the artbox based one best estimates or the default.
+
+=cut
+
+sub get_artbox
+{
+ my ($self) = @_;
+ my $media = [ 0, 0, 612, 792 ];
+ foreach my $mediatype (qw[ArtBox TrimBox BleedBox CropBox MediaBox])
+ {
+ my $mediaobj = undef;
+ if($mediaobj = $self->find_prop($mediatype))
+ {
+ $media = [ map{ $_->val } $mediaobj->elementsof ];
+ last;
+ }
+ }
+
+ return(@{$media});
+}
+
=item $page->rotate $deg
Rotates the page by the given degrees, which must be a multiple of 90.
@@ -469,6 +561,9 @@
=head1 HISTORY
$Log: Page.pm,v $
+ Revision 1.15 2005/11/02 18:18:20 fredo
+ added get_(crop/bleed/trim/art)box methods
+
Revision 1.14 2005/08/06 20:59:10 fredo
fixed anotation pdf-array again for other braindead softs
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm 2005-11-11 23:10:53 UTC (rev 1492)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm 2005-11-11 23:19:40 UTC (rev 1493)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: FontFile.pm,v 1.18 2005/10/20 21:05:14 fredo Exp $
+# $Id: FontFile.pm,v 1.20 2005/11/02 18:21:29 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont::TrueType::FontFile;
@@ -49,7 +49,7 @@
@ISA = qw( PDF::API2::Basic::PDF::Dict );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.18 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/20 21:05:14 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.20 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/11/02 18:21:29 $
$cmap={};
}
no warnings qw[ recursion uninitialized ];
@@ -369,8 +369,12 @@
read($fh, $buf, 6);
my ($idx1,$idx2,$val)=unpack('nnn',$buf);
$val-=65536 if($val>32767);
- $data->{"$idx1:$idx2"}=-int($val*1000/$upem);
- $data->{$self->data->{g2n}->[$idx1].':'.$self->data->{g2n}->[$idx2]}=$data->{"$idx1:$idx2"};
+ $val= $val < 0 ? -floor($val*1000/$upem) : -ceil($val*1000/$upem);
+ if($val != 0)
+ {
+ $data->{"$idx1:$idx2"}=$val;
+ $data->{$self->data->{g2n}->[$idx1].':'.$self->data->{g2n}->[$idx2]}=$val;
+ }
}
}
elsif($fmt==2)
@@ -712,6 +716,12 @@
=head1 HISTORY
$Log: FontFile.pm,v $
+ Revision 1.20 2005/11/02 18:21:29 fredo
+ added kerning lookup strategy
+
+ Revision 1.19 2005/10/22 19:56:55 fredo
+ added mor agressive kerning strategy
+
Revision 1.18 2005/10/20 21:05:14 fredo
added handling of optional kerning
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm 2005-11-11 23:10:53 UTC (rev 1492)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm 2005-11-11 23:19:40 UTC (rev 1493)
@@ -9,18 +9,18 @@
package PDF::API2::Version;
BEGIN {
use vars qw( $VERSION %CVersion );
- $VERSION = '0.49';
+ $VERSION = '0.50';
%CVersion = (
- 'vFredo' => 'PDF::API2 0.49 (fix-3328 / 2005-10-21)',
- 'vGNU' => 'PDF::API2 0.49 (2005-10-21 23:48:42)',
- 'vHex' => '0x00031D00',
- 'vLong' => '0.49 (2005-10-21 23:48:42)',
- 'vPerl' => '0.49',
- 'vShort' => '0.49',
- 'vSquid' => '0.49-fix-3328',
- 'vTeX' => 'This is PDF::API2, Version 0.49 (2005-10-21 23:48:42)',
- 'vWeb' => 'PDF::API2/0.49',
- 'vWin' => '0.49 build 3328',
+ 'vFredo' => 'PDF::API2 0.50 (fix-3328 / 2005-11-02)',
+ 'vGNU' => 'PDF::API2 0.50 (2005-11-02 19:22:10)',
+ 'vHex' => '0x00032D00',
+ 'vLong' => '0.50 (2005-11-02 19:22:10)',
+ 'vPerl' => '0.50',
+ 'vShort' => '0.50',
+ 'vSquid' => '0.50-fix-3328',
+ 'vTeX' => 'This is PDF::API2, Version 0.50 (2005-11-02 19:22:10)',
+ 'vWeb' => 'PDF::API2/0.50',
+ 'vWin' => '0.50 build 3328',
);
}
1;
@@ -36,16 +36,16 @@
=head1 VERSION
- vFredo: PDF::API2 0.49 (fix-3328 / 2005-10-21)
- vGNU: PDF::API2 0.49 (2005-10-21 23:48:42)
- vHex: 0x00031D00
- vLong: 0.49 (2005-10-21 23:48:42)
- vPerl: 0.49
- vShort: 0.49
- vSquid: 0.49-fix-3328
- vTeX: This is PDF::API2, Version 0.49 (2005-10-21 23:48:42)
- vWeb: PDF::API2/0.49
- vWin: 0.49 build 3328
+ vFredo: PDF::API2 0.50 (fix-3328 / 2005-11-02)
+ vGNU: PDF::API2 0.50 (2005-11-02 19:22:10)
+ vHex: 0x00032D00
+ vLong: 0.50 (2005-11-02 19:22:10)
+ vPerl: 0.50
+ vShort: 0.50
+ vSquid: 0.50-fix-3328
+ vTeX: This is PDF::API2, Version 0.50 (2005-11-02 19:22:10)
+ vWeb: PDF::API2/0.50
+ vWin: 0.50 build 3328
=cut
More information about the Pkg-perl-cvs-commits
mailing list