r1450 - in packages/libpdf-api2-perl/branches/upstream/current: .
examples lib/PDF lib/PDF/API2 lib/PDF/API2/Basic/PDF
lib/PDF/API2/Resource lib/PDF/API2/Resource/CIDFont
lib/PDF/API2/Resource/CIDFont/TrueType lib/PDF/API2/Resource/Font
lib/PDF/API2/Resource/Font/CoreFont
lib/PDF/API2/Resource/XObject/Image
Gunnar Wolf
gwolf at costa.debian.org
Mon Oct 24 17:12:28 UTC 2005
Author: gwolf
Date: 2005-10-24 17:11:49 +0000 (Mon, 24 Oct 2005)
New Revision: 1450
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/examples/020_corefonts
packages/libpdf-api2-perl/branches/upstream/current/examples/025_unifonts
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Basic/PDF/File.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/IOString.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType.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/Resource/Font.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/BdFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont/courier.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/Postscript.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/XObject/Image/JPEG.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/uniglyph.txt
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm
Log:
Load /tmp/tmp.h5yK71/libpdf-api2-perl-0.49 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-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/CHANGELOG 2005-10-24 17:11:49 UTC (rev 1450)
@@ -1,3 +1,114 @@
+2005-10-21 23:42 fredo
+
+ * lib/PDF/API2/Basic/PDF/File.pm: speedup reading large
+ dictionaries/structs
+
+2005-10-21 23:42 fredo
+
+ * lib/PDF/API2/IOString.pm: fixed tell tier
+
+2005-10-21 21:52 fredo
+
+ * lib/PDF/API2/Basic/PDF/File.pm: fixed readxrtr to be more strict
+ to the latest pdf-spec
+
+2005-10-21 21:51 fredo
+
+ * lib/PDF/API2.pm: fixed proc_pages
+
+2005-10-20 23:06 fredo
+
+ * lib/PDF/API2.pm: documented '-dokern' option for ttfonts
+
+2005-10-20 23:04 fredo
+
+ * lib/PDF/API2/Resource/: CIDFont/TrueType.pm, CIDFont.pm,
+ CIDFont/TrueType/FontFile.pm: added handling of optional kerning
+
+2005-10-20 01:05 fredo
+
+ * lib/PDF/API2/Resource/Font/Postscript.pm: silenced 'cannot parse'
+ since it is usually no error
+
+2005-10-19 23:23 fredo
+
+ * lib/PDF/API2.pm: documented '-dokern' option for core- and
+ psfonts
+
+2005-10-19 21:12 fredo
+
+ * lib/PDF/API2/Resource/Font/: Postscript.pm, CoreFont.pm: added
+ handling of optional kerning
+
+2005-10-19 21:08 fredo
+
+ * lib/PDF/API2/Resource/UniFont.pm: added extended typographic text
+ handling call
+
+2005-10-19 21:07 fredo
+
+ * lib/PDF/API2/Resource/Font.pm: added handling of composites in
+ automap
+
+2005-10-19 21:06 fredo
+
+ * lib/PDF/API2/Resource/BaseFont.pm: added handling of kerning
+
+2005-10-19 21:05 fredo
+
+ * lib/PDF/API2/IOString.pm: ...
+
+2005-10-19 21:04 fredo
+
+ * lib/PDF/API2/Content.pm: added extended typographic text handling
+ call
+
+2005-10-02 01:38 fredo
+
+ * lib/PDF/API2/Resource/Font/Postscript.pm: added kerning+composite
+ parsing added nonembedding check
+
+2005-10-02 00:41 fredo
+
+ * lib/PDF/API2/Resource/Font/: BdFont.pm, CoreFont.pm,
+ Postscript.pm: fixed font-naming race condition for multiple
+ document updates
+
+2005-10-02 00:30 fredo
+
+ * lib/PDF/API2/Resource/CIDFont/TrueType.pm: fixed font-naming race
+ condition for multiple document updates
+
+2005-10-02 00:10 fredo
+
+ * lib/PDF/API2/Content.pm: added more docs for textlabel
+
+2005-09-28 19:02 fredo
+
+ * lib/PDF/API2/Resource/XObject/Image/JPEG.pm: fixed iostring
+ handling
+
+2005-09-28 19:00 fredo
+
+ * lib/PDF/API2/Resource/Font/CoreFont/courier.pm: added composites
+
+2005-09-28 19:00 fredo
+
+ * lib/PDF/API2/Resource/uniglyph.txt: added combiners
+
+2005-09-26 22:07 fredo
+
+ * lib/PDF/API2/Resource/Font/CoreFont.pm: added fontmetric stub
+
+2005-09-26 22:06 fredo
+
+ * lib/PDF/API2/Resource/Font.pm: removed composite glyphs from
+ automap
+
+2005-09-26 21:28 fredo
+
+ * lib/PDF/API2/Resource/Font/CoreFont/courier.pm: no message
+
2005-09-12 18:56 fredo
* lib/PDF/API2/Resource/Font/: CoreFont.pm, CoreFont/bankgothic.pm,
Modified: packages/libpdf-api2-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/META.yml 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/META.yml 2005-10-24 17:11:49 UTC (rev 1450)
@@ -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.46
+version: 0.49
version_from: lib/PDF/API2/Version.pm
installdirs: site
requires:
Modified: packages/libpdf-api2-perl/branches/upstream/current/examples/020_corefonts
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/examples/020_corefonts 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/examples/020_corefonts 2005-10-24 17:11:49 UTC (rev 1450)
@@ -41,8 +41,7 @@
my $sx=33;
my $sy=45;
my $fx=20;
-
-foreach $fn (qw(
+ at fns=qw{
Helvetica
Helvetica-Oblique
Helvetica-Bold
@@ -72,9 +71,29 @@
verdanabolditalic
wingdings
webdings
-))
+};
+
+ at ecs=qw{
+ latin1
+ latin2
+ latin3
+ latin4
+ latin5
+ latin6
+ latin7
+ latin8
+ latin9
+ latin10
+};
+
+if(scalar @ARGV)
{
- foreach $ec (qw[latin1 latin2 latin3 latin4 latin5 latin6 latin7 latin8 latin9 latin10])
+ @fns=@ARGV;
+}
+
+foreach $fn (@fns)
+{
+ foreach $ec (qw{ latin1 })
{
$pdf=PDF::API2->new;
@@ -145,7 +164,6 @@
$pdf->end();
}
- last;
}
exit;
Modified: packages/libpdf-api2-perl/branches/upstream/current/examples/025_unifonts
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/examples/025_unifonts 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/examples/025_unifonts 2005-10-24 17:11:49 UTC (rev 1450)
@@ -102,28 +102,28 @@
'KozGo-Italic + Georgia-Italic'=>$u3
);
-$y=800;
-$page = $api->page;
-$gfx = $page->gfx;
-
foreach my $fontname ('KozMin','KozMin-Bold + Times','KozGo-Italic + Trebuchet-Italic','KozGo-Italic + Georgia-Italic')
{
+ $y=800;
+
+ $page = $api->page;
+ $gfx = $page->gfx;
+ delete $gfx->{Filter};
my $font=$fonts{$fontname};
$uw->{widthobj}=$font;
seek(DATA,$start,0);
binmode(DATA,':raw');
- #delete $gfx->{Filter};
- $i=0;
-
- $gfx->textlabel(100,$y,$helv,10,$fontname,-color=>'darkred');
- $y-=15;
- $line=<DATA>;
- $line=~s|[\012\015]+$||go;
- $gfx->textlabel(100,$y,$font,10,$line,-hspace=>80);
- $y-=20;
+ $gfx->textlabel(50,$y,$helv,10,$fontname,-color=>'darkred');
+ foreach (1..45)
+ {
+ $y-=15;
+ $line=<DATA>;
+ $line=~s|[\012\015]+$||go;
+ $gfx->textlabel(50,$y,$font,10,$line,-hspace=>80);
+ }
}
$api->saveas("$0.pdf");
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Basic/PDF/File.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Basic/PDF/File.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Basic/PDF/File.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -23,7 +23,7 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: File.pm,v 1.19 2005/06/02 12:59:43 fredo Exp $
+# $Id: File.pm,v 1.21 2005/10/21 21:42:56 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::PDF::File;
@@ -178,6 +178,7 @@
$t =~ s|::|/|og;
require "$t.pm";
}
+ $PDF::API2::Basic::PDF::File::readDebug=0;
}
@@ -301,9 +302,12 @@
$fh->seek(0, 2); # go to end of file
$end = $fh->tell();
$self->{' epos'} = $end;
- if (!$fh->seek(($end > 1024 ? $end - 1024 : 0, 0)))
+# if (!$fh->seek(($end > 1024 ? $end - 1024 : 0, 0)))
+# { die "Seek failed when reading PDF file $fname"; }
+# $fh->read($buf, 1024);
+ if (!$fh->seek(($end > 64 ? $end - 64 : 0, 0)))
{ die "Seek failed when reading PDF file $fname"; }
- $fh->read($buf, 1024);
+ $fh->read($buf, 64);
if ($buf !~ m/startxref$cr([0-9]+)$cr\%\%eof.*?$/oi)
{ die "Malformed PDF file $fname"; }
$xpos = $1;
@@ -352,8 +356,10 @@
$fh->seek(0, 2); # go to end of file
$end = $fh->tell();
$self->{' epos'} = $end;
- $fh->seek($end - 1024, 0);
- $fh->read($buf, 1024);
+# $fh->seek($end - 1024, 0);
+# $fh->read($buf, 1024);
+ $fh->seek($end - 64, 0);
+ $fh->read($buf, 64);
if ($buf !~ m/startxref$cr\s*([0-9]+)$cr\%\%eof.*?/oi)
{ die "Malformed PDF file $fname"; }
$xpos = $1;
@@ -567,12 +573,14 @@
my ($fh) = $self->{' INFILE'};
my ($res, $key, $value, $k);
- $str = update($fh, $str);
+ #$str = update($fh, $str);
+ updateRef($fh, \$str);
if ($str =~ m/^<</so)
{
$str = substr ($str, 2);
- $str = update($fh, $str);
+ #$str = update($fh, $str);
+ updateRef($fh, \$str);
$res = PDFDict();
while ($str !~ m/^>>/o) {
@@ -594,10 +602,12 @@
($value, $str) = $self->readval($str, %opts);
$res->{null} = $value;
}
- $str = update($fh, $str); # thanks gareth.jones at stud.man.ac.uk
+ #$str = update($fh, $str); # thanks gareth.jones at stud.man.ac.uk
+ updateRef($fh, \$str); # thanks gareth.jones at stud.man.ac.uk
}
$str =~ s/^>>//o;
- $str = update($fh, $str);
+ #$str = update($fh, $str);
+ updateRef($fh, \$str);
# streams can't be followed by a lone carriage-return.
# fredo: yes they can !!! -- use the MacOS Luke.
if (($str =~ s/^stream(?:(?:\015\012)|\012|\015)//o)
@@ -618,7 +628,8 @@
$value .= substr($str, 0, $k);
$res->{' stream'} = $value;
$res->{' nofilt'} = 1;
- $str = update($fh, $str, 1); # tell update we are in-stream and only need an endstream
+ #$str = update($fh, $str, 1); # tell update we are in-stream and only need an endstream
+ updateRef($fh, \$str, 1); # tell update we are in-stream and only need an endstream
#$str =~ s/^endstream//o; # we cannot regexpr here since we need the first endstream only
# so we do the following:
my $wh = index($str,'endstream');
@@ -630,7 +641,8 @@
if (defined $res->{'Type'} && defined $types{$res->{'Type'}->val});
# gdj: FIXME: if any of the ws chars were crs, then the whole
# string might not have been read.
- } elsif ($str =~ m/^([0-9]+)$ws_char+([0-9]+)$ws_char+R/so) # objind
+ }
+ elsif ($str =~ m/^([0-9]+)$ws_char+([0-9]+)$ws_char+R/so) # objind
{
$k = $1;
$value = $2;
@@ -646,7 +658,8 @@
$res->{' realised'} = 0;
# gdj: FIXME: if any of the ws chars were crs, then the whole
# string might not have been read.
- } elsif ($str =~ m/^([0-9]+)$ws_char+([0-9]+)$ws_char+obj/so) # object data
+ }
+ elsif ($str =~ m/^([0-9]+)$ws_char+([0-9]+)$ws_char+obj/so) # object data
{
my ($obj);
$k = $1;
@@ -661,7 +674,8 @@
$self->add_obj($res, $k, $value);
$res->{' realised'} = 1;
}
- $str = update($fh, $str); # thanks to kundrat at kundrat.sk
+ #$str = update($fh, $str); # thanks to kundrat at kundrat.sk
+ updateRef($fh, \$str); # thanks to kundrat at kundrat.sk
$str =~ s/^endobj//o;
} elsif ($str =~ m|^/($reg_char+)|so) # name
{
@@ -711,39 +725,47 @@
}
$res = PDF::API2::Basic::PDF::String->from_pdf($value);
- } elsif ($str =~ m/^</o) # hex-string
+ }
+ elsif ($str =~ m/^</o) # hex-string
{
$str =~ s/^<//o;
$fh->read($str, 255, length($str)) while (0 > index( $str, '>' ));
($value, $str) = ($str =~ /^(.*?)>(.*?)$/so);
$res = PDF::API2::Basic::PDF::String->from_pdf("<" . $value . ">");
- } elsif ($str =~ m/^\[/o) # array
+ }
+ elsif ($str =~ m/^\[/o) # array
{
$str =~ s/^\[//o;
- $str = update($fh, $str);
+ #$str = update($fh, $str);
+ updateRef($fh, \$str);
$res = PDFArray();
while ($str !~ m/^\]/o)
{
($value, $str) = $self->readval($str, %opts);
$res->add_elements($value);
- $str = update($fh, $str); # str might just be exhausted!
+ #$str = update($fh, $str); # str might just be exhausted!
+ updateRef($fh, \$str); # str might just be exhausted!
}
$str =~ s/^\]//o;
- } elsif ($str =~ m/^(true|false)$irreg_char/o) # boolean
+ }
+ elsif ($str =~ m/^(true|false)$irreg_char/o) # boolean
{
$value = $1;
$str =~ s/^(?:true|false)//o;
$res = PDF::API2::Basic::PDF::Bool->from_pdf($value);
- } elsif ($str =~ m/^([+-.0-9]+)$irreg_char/o) # number
+ }
+ elsif ($str =~ m/^([+-.0-9]+)$irreg_char/o) # number
{
$value = $1;
$str =~ s/^([+-.0-9]+)//o;
$res = PDF::API2::Basic::PDF::Number->from_pdf($value);
- } elsif ($str =~ m/^null$irreg_char/o)
+ }
+ elsif ($str =~ m/^null$irreg_char/o)
{
$str =~ s/^null//o;
$res = PDF::API2::Basic::PDF::Null->new;
- } else
+ }
+ else
{
# finally give up
die "Can't parse `$str' near " . ($fh->tell()) . " length " . length($str) . ".";
@@ -1087,24 +1109,27 @@
sub update
{
my ($fh, $str, $instream) = @_;
-
+ print STDERR "fpos=".tell($fh)." strlen=".length($str)."\n" if($readDebug);
if($instream) {
# we are inside a (possible binary) stream
# so we fetch data till we see an 'endstream'
# -- fredo/2004-09-03
while ($str !~ m/endstream/o && !$fh->eof)
{
+ print STDERR "fpos=".tell($fh)." strlen=".length($str)."\n" if($readDebug);
$fh->read($str, 314, length($str));
}
} else {
$str =~ s/^$ws_char*//o;
while ($str !~ m/$cr/o && !$fh->eof)
{
+ print STDERR "fpos=".tell($fh)." strlen=".length($str)."\n" if($readDebug);
$fh->read($str, 314, length($str));
$str =~ s/^$ws_char*//so;
}
while ($str =~ m/^\%/o) # restructured by fredo/2003-03-23
{
+ print STDERR "fpos=".tell($fh)." strlen=".length($str)."\n" if($readDebug);
$fh->read($str, 314, length($str)) while ($str !~ m/$cr/o && !$fh->eof);
$str =~ s/^\%[^\015\012]+$ws_char*//so; # fixed for reportlab -- fredo
}
@@ -1113,7 +1138,42 @@
return $str;
}
+sub updateRef
+{
+ my ($fh, $str, $instream) = @_;
+ my $inlen=16; my $inoff=1;
+ print STDERR "fpos=".tell($fh)." strlen=".length($$str)."\n" if($readDebug);
+ if($instream) {
+ # we are inside a (possible binary) stream
+ # so we fetch data till we see an 'endstream'
+ # -- fredo/2004-09-03
+ while ($$str !~ m/endstream/o && !$fh->eof)
+ {
+ print STDERR "fpos=".tell($fh)." strlen=".length($$str)."\n" if($readDebug);
+ $fh->read($$str, 314, length($$str));
+ }
+ } else {
+ $$str =~ s/^$ws_char*//o;
+ while ($$str !~ m/$cr/o && !$fh->eof && length($$str) < 16000)
+ {
+ print STDERR "fpos=".tell($fh)." strlen=".length($$str)."\n" if($readDebug);
+ $fh->read($$str, $inlen, length($$str));
+ $$str =~ s/^$ws_char*//so;
+ $inlen+=$inoff;
+ }
+ while ($$str =~ m/^\%/o) # restructured by fredo/2003-03-23
+ {
+ print STDERR "fpos=".tell($fh)." strlen=".length($$str)."\n" if($readDebug);
+ $fh->read($$str, $inlen, length($$str)) while ($$str !~ m/$cr/o && !$fh->eof);
+ $$str =~ s/^\%[^\015\012]+$ws_char*//so; # fixed for reportlab -- fredo
+ $inlen+=$inoff;
+ }
+ }
+ return undef;
+}
+
+
=head2 $objind = $p->test_obj($num, $gen)
Tests the cache to see whether an object reference (which may or may not have
@@ -1180,7 +1240,10 @@
$fh->read($buf, 20 * $xnum - $xdiff + 15, $xdiff);
while ($xnum-- > 0 && $buf =~ s/^0*([0-9]*)$ws_char+0*([0-9]+)$ws_char+([nf])$cr//o)
- { $xlist->{$xmin++} = [$1, $2, $3]; }
+ {
+ $xlist->{$xmin} = [$1, $2, $3] unless(exists $xlist->{$xmin});
+ $xmin++;
+ }
}
if ($buf !~ /^trailer$cr/oi)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Content.pm,v 1.38 2005/06/17 19:43:46 fredo Exp $
+# $Id: Content.pm,v 1.40 2005/10/19 19:04:43 fredo Exp $
#
#=======================================================================
@@ -47,7 +47,7 @@
@ISA = qw(PDF::API2::Basic::PDF::Dict);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.38 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:43:46 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.40 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/19 19:04:43 $
}
@@ -1818,14 +1818,14 @@
$self->matrix_update($wd,0);
}
my $ulxy1=[$self->textpos2];
- if($self->{' font'}->isvirtual)
- {
+ #if($self->{' font'}->isvirtual)
+ #{
$self->add($self->{' font'}->text($text,$self->{' fontsize'}));
- }
- else
- {
- $self->add($self->{' font'}->text($text),'Tj');
- }
+ #}
+ #else
+ #{
+ # $self->add($self->{' font'}->text($text),'Tj');
+ #}
$wd=$self->advancewidth($text);
$self->matrix_update($wd,0);
@@ -2044,7 +2044,8 @@
=item $width = $txt->textlabel $x, $y, $font, $size, $text, %options
-Applys text with options, but without teststart/end and optionally returns the width of the given text.
+Applys text with options, but without teststart/end
+and optionally returns the width of the given text.
B<Example:>
@@ -2053,12 +2054,19 @@
-rotate => -30,
-color => '#FF0000',
-hspace => 120,
- -center => 1,
+ -align => 'center',
);
+ $t->textlabel(500,500,$myfont,20,'Page Header',
+ -rotate => 30,
+ -color => '#0000FF',
+ -hspace => 80,
+ -align => 'right',
+ );
=cut
-sub textlabel {
+sub textlabel
+{
my ($self,$x,$y,$font,$size,$text,%opts,$wht) = @_;
my %trans_opts=( -translate => [$x,$y] );
my %text_state=();
@@ -2084,11 +2092,16 @@
$self->wordspace($opts{-wordspace}) if($opts{-wordspace});
$self->render($opts{-render}) if($opts{-render});
- if($opts{-right} || $opts{-align}=~/^r/i) {
+ if($opts{-right} || $opts{-align}=~/^r/i)
+ {
$wht = $self->text_right($text,%opts);
- } elsif($opts{-center} || $opts{-align}=~/^c/i) {
+ }
+ elsif($opts{-center} || $opts{-align}=~/^c/i)
+ {
$wht = $self->text_center($text,%opts);
- } else {
+ }
+ else
+ {
$wht = $self->text($text,%opts);
}
@@ -2150,6 +2163,12 @@
=head1 HISTORY
$Log: Content.pm,v $
+ Revision 1.40 2005/10/19 19:04:43 fredo
+ added extended typographic text handling call
+
+ Revision 1.39 2005/10/01 22:10:57 fredo
+ added more docs for textlabel
+
Revision 1.38 2005/06/17 19:43:46 fredo
fixed CPAN modulefile versioning (again)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/IOString.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/IOString.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/IOString.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -33,14 +33,14 @@
# Original Copyright 1998-2000 Gisle Aas.
# modified by Alfred Reibenschuh <areibens at cpan.org> for PDF::API2
#
-# $Id: IOString.pm,v 1.12 2005/06/17 19:43:46 fredo Exp $
+# $Id: IOString.pm,v 1.14 2005/10/21 21:42:15 fredo Exp $
#
#=======================================================================
package PDF::API2::IOString;
require 5.006;
use vars qw($VERSION $DEBUG $IO_CONSTANTS);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.12 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:43:46 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.14 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/21 21:42:15 $
use Symbol ();
use FileHandle;
no warnings qw[ deprecated recursion uninitialized ];
@@ -53,6 +53,32 @@
$self;
}
+sub __import_from_file
+{
+ my $self = shift @_;
+ my $file = shift @_;
+ my $buf = "";
+ *$self->{buf} = \$buf;
+ *$self->{pos} = 0;
+ *$self->{lno} = 0;
+ return unless($file);
+
+ my $in;
+ my $inf = undef;
+ open($inf,$file);
+ binmode($inf,':raw');
+
+ $inf->seek(0,0);
+ while(!$inf->eof) {
+ $inf->read($in,512);
+ $buf.=$in;
+ }
+ $inf->close;
+ $self->seek(0,0);
+
+ $self;
+}
+
sub import_from_file {
my $self = shift @_;
my $file = shift @_;
@@ -454,6 +480,7 @@
*WRITE = \&write;
*CLOSE = \&close;
*SEEK = \&seek;
+*TELL = \&getpos;
sub string_ref
{
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: BaseFont.pm,v 1.17 2005/06/17 19:44:03 fredo Exp $
+# $Id: BaseFont.pm,v 1.18 2005/10/19 19:06:27 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::BaseFont;
@@ -46,7 +46,7 @@
@ISA = qw( PDF::API2::Resource );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.17 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:03 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.18 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/19 19:06:27 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -590,8 +590,15 @@
if(is_utf8($text)) {
$text=$self->strByUtf($text)
}
- foreach my $n (unpack('C*',$text)) {
+ my $lastglyph='';
+ foreach my $n (unpack('C*',$text))
+ {
$width+=$self->wxByEnc($n);
+ if($self->{-dokern} && ref($self->data->{kern}))
+ {
+ $width+=$self->data->{kern}->{$lastglyph.':'.$self->data->{e2n}->[$n]};
+ $lastglyph=$self->data->{e2n}->[$n];
+ }
}
$width/=1000;
return($width);
@@ -651,7 +658,8 @@
=cut
-sub textByStr {
+sub textByStr
+{
my ($self,$text)=@_;
my $newtext='';
if(is_utf8($text))
@@ -665,19 +673,64 @@
return($newtext);
}
-sub text {
- my ($self,$text,$size)=@_;
+sub textByStrKern
+{
+ my ($self,$text)=@_;
+ if($self->{-dokern} && ref($self->data->{kern}))
+ {
+ my $newtext=' ';
+ if(is_utf8($text))
+ {
+ $text=$self->strByUtf($text);
+ }
- my $newtext=$self->textByStr($text);
+ my $lastglyph='';
+ my $tBefore=0;
+ foreach my $n (unpack('C*',$text))
+ {
+ if(defined $self->data->{kern}->{$lastglyph.':'.$self->data->{e2n}->[$n]})
+ {
+ $newtext.=') ' if($tBefore);
+ $newtext.=sprintf('%i ',-($self->data->{kern}->{$lastglyph.':'.$self->data->{e2n}->[$n]}));
+ $tBefore=0;
+ }
+ $lastglyph=$self->data->{e2n}->[$n];
+ my $t=pack('C',$n);
+ $t=~s/\\/\\\\/go;
+ $t=~s/([\x00-\x1f])/sprintf('\%03lo',ord($1))/ge;
+ $t=~s/([\{\}\[\]\(\)])/\\$1/g;
+ $newtext.='(' if(!$tBefore);
+ $newtext.="$t";
+ $tBefore=1;
+ }
+ $newtext.=') ' if($tBefore);
+ return($newtext);
+ }
+ else
+ {
+ return('('.$self->textByStr($text).')');
+ }
+}
- if(defined $size)
- {
- return("($newtext) Tj");
- }
- else
- {
- return("($newtext)");
- }
+sub text
+{
+ my ($self,$text,$size)=@_;
+
+ my $newtext=$self->textByStr($text);
+
+ if(defined $size && $self->{-dokern})
+ {
+ $newtext=$self->textByStrKern($text);
+ return("[ $newtext ] TJ");
+ }
+ elsif(defined $size)
+ {
+ return("[ ($newtext) ] TJ");
+ }
+ else
+ {
+ return("($newtext)");
+ }
}
sub isvirtual { return(undef); }
@@ -695,6 +748,9 @@
=head1 HISTORY
$Log: BaseFont.pm,v $
+ Revision 1.18 2005/10/19 19:06:27 fredo
+ added handling of kerning
+
Revision 1.17 2005/06/17 19:44:03 fredo
fixed CPAN modulefile versioning (again)
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-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: FontFile.pm,v 1.17 2005/09/12 16:52:59 fredo Exp $
+# $Id: FontFile.pm,v 1.18 2005/10/20 21:05:14 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont::TrueType::FontFile;
@@ -42,14 +42,14 @@
use PDF::API2::Basic::PDF::Utils;
use PDF::API2::Basic::PDF::Dict;
use PDF::API2::Basic::TTF::Font;
-
+ use Data::Dumper;
use POSIX;
use vars qw( @ISA $VERSION $cmap );
@ISA = qw( PDF::API2::Basic::PDF::Dict );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.17 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/09/12 16:52:59 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.18 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/20 21:05:14 $
$cmap={};
}
no warnings qw[ recursion uninitialized ];
@@ -338,6 +338,54 @@
return($dict);
}
+sub read_kern_table
+{
+ my $font=shift @_;
+ my $upem=shift @_;
+ my $self=shift @_;
+ my $fh=$font->{' INFILE'};
+ my $data=undef;
+
+ return(undef) unless($font->{kern});
+
+ my $buf = undef;
+
+ seek($fh,$font->{kern}->{' OFFSET'}+2,0);
+ read($fh,$buf, 2);
+ my $num=unpack('n',$buf);
+ foreach my $n (1..$num)
+ {
+ read($fh, $buf, 6);
+ my ($ver, $len, $cov) = unpack('n3', $buf);
+ $len-=6;
+ my $fmt=$cov>>8;
+ if($fmt==0)
+ {
+ $data||={};
+ read($fh, $buf, 8);
+ my $nc = unpack('n', $buf);
+ foreach (1..$nc)
+ {
+ 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"};
+ }
+ }
+ elsif($fmt==2)
+ {
+ read($fh, $buf, $len);
+ }
+ else
+ {
+ read($fh, $buf, $len);
+ }
+ }
+ ##print Dumper($data);
+ return($data);
+}
+
sub readcffstructs
{
my $font=shift @_;
@@ -581,6 +629,10 @@
$data->{wx}->[$w]=int($font->{'hmtx'}->read->{'advance'}[$w]*1000/$data->{upem})
|| $data->{missingwidth};
}
+
+ $data->{kern}=read_kern_table($font,$data->{upem},$self);
+ delete $data->{kern} unless(defined $data->{kern});
+
return($self,$data);
}
@@ -588,7 +640,17 @@
sub data { return( $_[0]->{' data'} ); }
sub iscff { return( $_[0]->data->{iscff} ); }
-sub subsetByCId {
+sub haveKernPairs { return( $_[0]->data->{kern} ? 1 : 0 ); }
+
+sub kernPairCid
+{
+ my ($self, $i1, $i2) = @_;
+ return(0) if($i1==0 || $i2==0);
+ return($self->data->{kern}->{"$i1:$i2"} || 0);
+}
+
+sub subsetByCId
+{
my $self = shift @_;
my $g = shift @_;
$self->data->{subset}=1;
@@ -650,6 +712,9 @@
=head1 HISTORY
$Log: FontFile.pm,v $
+ Revision 1.18 2005/10/20 21:05:14 fredo
+ added handling of optional kerning
+
Revision 1.17 2005/09/12 16:52:59 fredo
added -isocmap option; fixed cmap handling for fallback entries
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: TrueType.pm,v 1.13 2005/09/12 16:53:23 fredo Exp $
+# $Id: TrueType.pm,v 1.15 2005/10/20 21:04:57 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont::TrueType;
@@ -51,7 +51,7 @@
@ISA = qw( PDF::API2::Resource::CIDFont );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.13 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/09/12 16:53:23 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.15 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/20 21:04:57 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -76,7 +76,7 @@
my ($ff,$data)=PDF::API2::Resource::CIDFont::TrueType::FontFile->new($pdf,$file, at opts);
$class = ref $class if ref $class;
- my $self=$class->SUPER::new($pdf,$data->{apiname}.pdfkey());
+ my $self=$class->SUPER::new($pdf,$data->{apiname}.pdfkey().'~'.time());
$pdf->new_obj($self) if(defined($pdf) && !$self->is_obj($pdf));
$self->{' data'}=$data;
@@ -89,7 +89,7 @@
$de->{'FontDescriptor'} = $des;
$de->{'Subtype'} = PDFName($self->iscff ? 'CIDFontType0' : 'CIDFontType2');
- $de->{'BaseFont'} = PDFName($self->fontname);
+ $de->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname).'~'.time());
$de->{'DW'} = PDFNum($self->missingwidth);
$des->{$self->data->{iscff} ? 'FontFile3' : 'FontFile2'}=$ff;
@@ -107,6 +107,8 @@
$self->{' ff'} = $ff;
$pdf->new_obj($ff);
+ $self->{-dokern}=1 if($opts{-dokern});
+
return($self);
}
@@ -121,7 +123,8 @@
=cut
-sub new_api {
+sub new_api
+{
my ($class,$api, at opts)=@_;
my $obj=$class->new($api->{pdf}, at opts);
@@ -131,27 +134,45 @@
return($obj);
}
-sub wxByCId {
+sub wxByCId
+{
my $self=shift @_;
my $g=shift @_;
my $w;
- if(defined $self->fontobj->{'hmtx'}->read->{'advance'}[$g]) {
+ if(defined $self->fontobj->{'hmtx'}->read->{'advance'}[$g])
+ {
$w = int($self->fontobj->{'hmtx'}->read->{'advance'}[$g]*1000/$self->data->{upem});
- } else {
+ }
+ else
+ {
$w = $self->missingwidth;
}
return($w);
}
-sub subsetByCId {
+sub haveKernPairs
+{
my $self = shift @_;
+ return($self->fontfile->haveKernPairs(@_));
+}
+
+sub kernPairCid
+{
+ my $self = shift @_;
+ return($self->fontfile->kernPairCid(@_));
+}
+
+sub subsetByCId
+{
+ my $self = shift @_;
return if($self->iscff);
my $g = shift @_;
$self->fontfile->subsetByCId($g);
}
-sub subvec {
+sub subvec
+{
my $self = shift @_;
return(1) if($self->iscff);
my $g = shift @_;
@@ -160,7 +181,8 @@
sub glyphNum { return ( $_[0]->fontfile->glyphNum ); }
-sub outobjdeep {
+sub outobjdeep
+{
my ($self, $fh, $pdf, %opts) = @_;
return $self->SUPER::outobjdeep($fh, $pdf) if defined $opts{'passthru'};
@@ -171,16 +193,22 @@
$self->{' de'}->{'W'} = $wx;
my $ml;
- foreach my $w (0..(scalar @{$self->data->{g2u}} - 1 )) {
- if($self->subvec($w) && $notdefbefore==1) {
+ foreach my $w (0..(scalar @{$self->data->{g2u}} - 1 ))
+ {
+ if($self->subvec($w) && $notdefbefore==1)
+ {
$notdefbefore=0;
$ml=PDFArray();
$wx->add_elements(PDFNum($w),$ml);
$ml->add_elements(PDFNum($self->data->{wx}->[$w]));
- } elsif($self->subvec($w) && $notdefbefore==0) {
+ }
+ elsif($self->subvec($w) && $notdefbefore==0)
+ {
$notdefbefore=0;
$ml->add_elements(PDFNum($self->data->{wx}->[$w]));
- } else {
+ }
+ else
+ {
$notdefbefore=1;
}
# optimization for cjk
@@ -212,6 +240,12 @@
=head1 HISTORY
$Log: TrueType.pm,v $
+ Revision 1.15 2005/10/20 21:04:57 fredo
+ added handling of optional kerning
+
+ Revision 1.14 2005/10/01 22:30:16 fredo
+ fixed font-naming race condition for multiple document updates
+
Revision 1.13 2005/09/12 16:53:23 fredo
added -isocmap option
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: CIDFont.pm,v 1.14 2005/06/17 19:44:03 fredo Exp $
+# $Id: CIDFont.pm,v 1.15 2005/10/20 21:05:05 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont;
@@ -48,7 +48,7 @@
@ISA = qw( PDF::API2::Resource::BaseFont );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.14 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:03 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.15 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/20 21:05:05 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -139,8 +139,17 @@
sub width_cid {
my ($self,$text)=@_;
my $width=0;
+ my $lastglyph=0;
foreach my $n (unpack('n*',$text)) {
$width+=$self->wxByCId($n);
+ if($self->{-dokern} && $self->haveKernPairs())
+ {
+ if($self->kernPairCid($lastglyph, $n))
+ {
+ $width-=$self->kernPairCid($lastglyph, $n);
+ }
+ }
+ $lastglyph=$n;
}
$width/=1000;
return($width);
@@ -204,12 +213,23 @@
return($self->text_cid($self->cidsByStr($text)));
}
+sub textByStrKern
+{
+ my ($self,$text,$size)=@_;
+ return($self->text_cid_kern($self->cidsByStr($text),$size));
+}
+
sub text
{
my ($self,$text,$size)=@_;
my $newtext=$self->textByStr($text);
- if(defined $size)
+ if(defined $size && $self->{-dokern})
{
+ $newtext=$self->textByStrKern($text,$size);
+ return($newtext);
+ }
+ elsif(defined $size)
+ {
return("$newtext Tj");
}
else
@@ -238,7 +258,62 @@
}
}
-sub encodeByName {
+sub text_cid_kern
+{
+ my ($self,$text,$size)=@_;
+ if(UNIVERSAL::can($self,'fontfile'))
+ {
+ foreach my $g (unpack('n*',$text))
+ {
+ $self->fontfile->subsetByCId($g);
+ }
+ }
+ if(defined $size && $self->{-dokern} && $self->haveKernPairs())
+ {
+ my $newtext=' ';
+ my $lastglyph=0;
+ my $tBefore=0;
+ foreach my $n (unpack('n*',$text))
+ {
+ if($self->kernPairCid($lastglyph, $n))
+ {
+ $newtext.='> ' if($tBefore);
+ $newtext.=sprintf('%i ',$self->kernPairCid($lastglyph, $n));
+ $tBefore=0;
+ }
+ $lastglyph=$n;
+ my $t=sprintf('%04X',$n);
+ $newtext.='<' if(!$tBefore);
+ $newtext.=$t;
+ $tBefore=1;
+ }
+ $newtext.='> ' if($tBefore);
+ return("[ $newtext ] TJ");
+ }
+ elsif(defined $size)
+ {
+ my $newtext=unpack('H*',$text);
+ return("<$newtext> Tj");
+ }
+ else
+ {
+ my $newtext=unpack('H*',$text);
+ return("<$newtext>");
+ }
+}
+
+sub kernPairCid
+{
+ return(0);
+}
+
+sub haveKernPairs
+{
+ return(0);
+}
+
+sub encodeByName
+{
my ($self,$enc) = @_;
return if($self->issymbol);
@@ -254,9 +329,14 @@
return($self);
}
+sub kernPairCid {
+ return(0);
+}
+
sub subsetByCId {
return(1);
}
+
sub subvec {
return(1);
}
@@ -289,6 +369,9 @@
=head1 HISTORY
$Log: CIDFont.pm,v $
+ Revision 1.15 2005/10/20 21:05:05 fredo
+ added handling of optional kerning
+
Revision 1.14 2005/06/17 19:44:03 fredo
fixed CPAN modulefile versioning (again)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/BdFont.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/BdFont.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/BdFont.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: BdFont.pm,v 1.6 2005/06/17 19:44:03 fredo Exp $
+# $Id: BdFont.pm,v 1.7 2005/10/01 22:41:07 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::Font::BdFont;
@@ -46,7 +46,7 @@
@ISA=qw(PDF::API2::Resource::Font);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.6 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:03 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.7 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/01 22:41:07 $
$BmpNum=0;
@@ -98,7 +98,7 @@
my %opts=@opts;
$class = ref $class if ref $class;
- $self = $class->SUPER::new($pdf, sprintf('%s+Bdf%02i',pdfkey(),++$BmpNum));
+ $self = $class->SUPER::new($pdf, sprintf('%s+Bdf%02i',pdfkey(),++$BmpNum).'~'.time());
$pdf->new_obj($self) unless($self->is_obj($pdf));
# adobe bitmap distribution font
@@ -244,7 +244,7 @@
$data->{bbox}{'.notdef'} = [0, 0, 0, 0];
}
- $data->{fontname}=pdfkey().'+'.time();
+ $data->{fontname}=pdfkey().pdfkey().'~'.time();
$data->{apiname}=$data->{fontname};
$data->{flags} = 34;
$data->{fontbbox} = [ split(/\s+/,$data->{FONTBOUNDINGBOX}) ];
@@ -301,6 +301,9 @@
=head1 HISTORY
$Log: BdFont.pm,v $
+ Revision 1.7 2005/10/01 22:41:07 fredo
+ fixed font-naming race condition for multiple document updates
+
Revision 1.6 2005/06/17 19:44:03 fredo
fixed CPAN modulefile versioning (again)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont/courier.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont/courier.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont/courier.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: courier.pm,v 1.9 2005/09/12 16:56:21 fredo Exp $
+# $Id: courier.pm,v 1.11 2005/09/28 17:00:52 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::Font::CoreFont::courier;
@@ -308,322 +308,508 @@
'ydieresis', # C+FF, U+00FF
],
'wx' => {
- 'a' => 600,
- 'A' => 600,
- 'Aacute' => 600,
- 'aacute' => 600,
- 'abreve' => 600,
- 'Abreve' => 600,
- 'acircumflex' => 600,
- 'Acircumflex' => 600,
- 'acute' => 600,
- 'adieresis' => 600,
- 'Adieresis' => 600,
- 'AE' => 600,
- 'ae' => 600,
- 'agrave' => 600,
- 'Agrave' => 600,
- 'amacron' => 600,
- 'Amacron' => 600,
- 'ampersand' => 600,
- 'Aogonek' => 600,
- 'aogonek' => 600,
- 'aring' => 600,
- 'Aring' => 600,
- 'asciicircum' => 600,
- 'asciitilde' => 600,
- 'asterisk' => 600,
- 'at' => 600,
- 'atilde' => 600,
- 'Atilde' => 600,
- 'B' => 600,
- 'b' => 600,
- 'backslash' => 600,
- 'bar' => 600,
- 'braceleft' => 600,
- 'braceright' => 600,
- 'bracketleft' => 600,
- 'bracketright' => 600,
- 'breve' => 600,
- 'brokenbar' => 600,
- 'bullet' => 600,
- 'C' => 600,
- 'c' => 600,
- 'cacute' => 600,
- 'Cacute' => 600,
- 'caron' => 600,
- 'Ccaron' => 600,
- 'ccaron' => 600,
- 'ccedilla' => 600,
- 'Ccedilla' => 600,
- 'cedilla' => 600,
- 'cent' => 600,
- 'circumflex' => 600,
- 'colon' => 600,
- 'comma' => 600,
- 'commaaccent' => 600,
- 'copyright' => 600,
- 'currency' => 600,
- 'd' => 600,
- 'D' => 600,
- 'dagger' => 600,
- 'daggerdbl' => 600,
- 'dcaron' => 600,
- 'Dcaron' => 600,
- 'dcroat' => 600,
- 'Dcroat' => 600,
- 'degree' => 600,
- 'Delta' => 600,
- 'dieresis' => 600,
- 'divide' => 600,
- 'dollar' => 600,
- 'dotaccent' => 600,
- 'dotlessi' => 600,
- 'e' => 600,
- 'E' => 600,
- 'eacute' => 600,
- 'Eacute' => 600,
- 'ecaron' => 600,
- 'Ecaron' => 600,
- 'ecircumflex' => 600,
- 'Ecircumflex' => 600,
- 'edieresis' => 600,
- 'Edieresis' => 600,
- 'Edotaccent' => 600,
- 'edotaccent' => 600,
- 'egrave' => 600,
- 'Egrave' => 600,
- 'eight' => 600,
- 'ellipsis' => 600,
- 'Emacron' => 600,
- 'emacron' => 600,
- 'emdash' => 600,
- 'endash' => 600,
- 'eogonek' => 600,
- 'Eogonek' => 600,
- 'equal' => 600,
- 'Eth' => 600,
- 'eth' => 600,
- 'Euro' => 600,
- 'exclam' => 600,
- 'exclamdown' => 600,
- 'F' => 600,
- 'f' => 600,
- 'fi' => 600,
- 'five' => 600,
- 'fl' => 600,
- 'florin' => 600,
- 'four' => 600,
- 'fraction' => 600,
- 'G' => 600,
- 'g' => 600,
- 'Gbreve' => 600,
- 'gbreve' => 600,
- 'gcommaaccent' => 600,
- 'Gcommaaccent' => 600,
- 'germandbls' => 600,
- 'grave' => 600,
- 'greater' => 600,
- 'greaterequal' => 600,
- 'guillemotleft' => 600,
- 'guillemotright' => 600,
- 'guilsinglleft' => 600,
- 'guilsinglright' => 600,
- 'H' => 600,
- 'h' => 600,
- 'hungarumlaut' => 600,
- 'hyphen' => 600,
- 'I' => 600,
- 'i' => 600,
- 'Iacute' => 600,
- 'iacute' => 600,
- 'Icircumflex' => 600,
- 'icircumflex' => 600,
- 'idieresis' => 600,
- 'Idieresis' => 600,
- 'Idotaccent' => 600,
- 'igrave' => 600,
- 'Igrave' => 600,
- 'Imacron' => 600,
- 'imacron' => 600,
- 'Iogonek' => 600,
- 'iogonek' => 600,
- 'j' => 600,
- 'J' => 600,
- 'k' => 600,
- 'K' => 600,
- 'Kcommaaccent' => 600,
- 'kcommaaccent' => 600,
- 'L' => 600,
- 'l' => 600,
- 'lacute' => 600,
- 'Lacute' => 600,
- 'lcaron' => 600,
- 'Lcaron' => 600,
- 'lcommaaccent' => 600,
- 'Lcommaaccent' => 600,
- 'less' => 600,
- 'lessequal' => 600,
- 'logicalnot' => 600,
- 'lozenge' => 600,
- 'Lslash' => 600,
- 'lslash' => 600,
- 'M' => 600,
- 'm' => 600,
- 'macron' => 600,
- 'minus' => 600,
- 'mu' => 600,
- 'multiply' => 600,
- 'n' => 600,
- 'N' => 600,
- 'nacute' => 600,
- 'Nacute' => 600,
- 'ncaron' => 600,
- 'Ncaron' => 600,
- 'ncommaaccent' => 600,
- 'Ncommaaccent' => 600,
- 'nine' => 600,
- 'notequal' => 600,
- 'ntilde' => 600,
- 'Ntilde' => 600,
- 'numbersign' => 600,
- 'o' => 600,
- 'O' => 600,
- 'oacute' => 600,
- 'Oacute' => 600,
- 'Ocircumflex' => 600,
- 'ocircumflex' => 600,
- 'Odieresis' => 600,
- 'odieresis' => 600,
- 'oe' => 600,
- 'OE' => 600,
- 'ogonek' => 600,
- 'ograve' => 600,
- 'Ograve' => 600,
- 'ohungarumlaut' => 600,
- 'Ohungarumlaut' => 600,
- 'Omacron' => 600,
- 'omacron' => 600,
- 'one' => 600,
- 'onehalf' => 600,
- 'onequarter' => 600,
- 'onesuperior' => 600,
- 'ordfeminine' => 600,
- 'ordmasculine' => 600,
- 'Oslash' => 600,
- 'oslash' => 600,
- 'Otilde' => 600,
- 'otilde' => 600,
- 'P' => 600,
- 'p' => 600,
- 'paragraph' => 600,
- 'parenleft' => 600,
- 'parenright' => 600,
- 'partialdiff' => 600,
- 'percent' => 600,
- 'period' => 600,
- 'periodcentered' => 600,
- 'perthousand' => 600,
- 'plus' => 600,
- 'plusminus' => 600,
- 'Q' => 600,
- 'q' => 600,
- 'question' => 600,
- 'questiondown' => 600,
- 'quotedbl' => 600,
- 'quotedblbase' => 600,
- 'quotedblleft' => 600,
- 'quotedblright' => 600,
- 'quoteleft' => 600,
- 'quoteright' => 600,
- 'quotesinglbase' => 600,
- 'quotesingle' => 600,
- 'R' => 600,
- 'r' => 600,
- 'racute' => 600,
- 'Racute' => 600,
- 'radical' => 600,
- 'rcaron' => 600,
- 'Rcaron' => 600,
- 'rcommaaccent' => 600,
- 'Rcommaaccent' => 600,
- 'registered' => 600,
- 'ring' => 600,
- 'S' => 600,
- 's' => 600,
- 'Sacute' => 600,
- 'sacute' => 600,
- 'Scaron' => 600,
- 'scaron' => 600,
- 'Scedilla' => 600,
- 'scedilla' => 600,
- 'Scommaaccent' => 600,
- 'scommaaccent' => 600,
- 'section' => 600,
- 'semicolon' => 600,
- 'seven' => 600,
- 'six' => 600,
- 'slash' => 600,
- 'space' => 600,
- 'sterling' => 600,
- 'summation' => 600,
- 'T' => 600,
- 't' => 600,
- 'Tcaron' => 600,
- 'tcaron' => 600,
- 'tcommaaccent' => 600,
- 'Tcommaaccent' => 600,
- 'Thorn' => 600,
- 'thorn' => 600,
- 'three' => 600,
- 'threequarters' => 600,
- 'threesuperior' => 600,
- 'tilde' => 600,
- 'trademark' => 600,
- 'two' => 600,
- 'twosuperior' => 600,
- 'u' => 600,
- 'U' => 600,
- 'Uacute' => 600,
- 'uacute' => 600,
- 'ucircumflex' => 600,
- 'Ucircumflex' => 600,
- 'udieresis' => 600,
- 'Udieresis' => 600,
- 'Ugrave' => 600,
- 'ugrave' => 600,
- 'uhungarumlaut' => 600,
- 'Uhungarumlaut' => 600,
- 'umacron' => 600,
- 'Umacron' => 600,
- 'underscore' => 600,
- 'Uogonek' => 600,
- 'uogonek' => 600,
- 'Uring' => 600,
- 'uring' => 600,
- 'V' => 600,
- 'v' => 600,
- 'w' => 600,
- 'W' => 600,
- 'X' => 600,
- 'x' => 600,
- 'y' => 600,
- 'Y' => 600,
- 'yacute' => 600,
- 'Yacute' => 600,
- 'Ydieresis' => 600,
- 'ydieresis' => 600,
- 'yen' => 600,
- 'Z' => 600,
- 'z' => 600,
- 'zacute' => 600,
- 'Zacute' => 600,
- 'Zcaron' => 600,
- 'zcaron' => 600,
- 'Zdotaccent' => 600,
- 'zdotaccent' => 600,
- 'zero' => 600,
+ 'A' => '600', # U=0041
+ 'a' => '600', # U=0061
+ 'Aacute' => '600', # U=00C1
+ 'aacute' => '600', # U=00E1
+ 'Abreve' => '600', # U=0102
+ 'abreve' => '600', # U=0103
+ 'Acircumflex' => '600', # U=00C2
+ 'acircumflex' => '600', # U=00E2
+ 'acute' => '600', # U=00B4
+ 'Adieresis' => '600', # U=00C4
+ 'adieresis' => '600', # U=00E4
+ 'AE' => '600', # U=00C6
+ 'ae' => '600', # U=00E6
+ 'Agrave' => '600', # U=00C0
+ 'agrave' => '600', # U=00E0
+ 'Amacron' => '600', # U=0100
+ 'amacron' => '600', # U=0101
+ 'ampersand' => '600', # U=0026
+ 'Aogonek' => '600', # U=0104
+ 'aogonek' => '600', # U=0105
+ 'Aring' => '600', # U=00C5
+ 'aring' => '600', # U=00E5
+ 'asciicircum' => '600', # U=005E
+ 'asciitilde' => '600', # U=007E
+ 'asterisk' => '600', # U=002A
+ 'at' => '600', # U=0040
+ 'Atilde' => '600', # U=00C3
+ 'atilde' => '600', # U=00E3
+ 'B' => '600', # U=0042
+ 'b' => '600', # U=0062
+ 'backslash' => '600', # U=005C
+ 'bar' => '600', # U=007C
+ 'braceleft' => '600', # U=007B
+ 'braceright' => '600', # U=007D
+ 'bracketleft' => '600', # U=005B
+ 'bracketright' => '600', # U=005D
+ 'breve' => '600', # U=02D8
+ 'brokenbar' => '600', # U=00A6
+ 'bullet' => '600', # U=2022
+ 'C' => '600', # U=0043
+ 'c' => '600', # U=0063
+ 'Cacute' => '600', # U=0106
+ 'cacute' => '600', # U=0107
+ 'caron' => '600', # U=02C7
+ 'Ccaron' => '600', # U=010C
+ 'ccaron' => '600', # U=010D
+ 'Ccedilla' => '600', # U=00C7
+ 'ccedilla' => '600', # U=00E7
+ 'cedilla' => '600', # U=00B8
+ 'cent' => '600', # U=00A2
+ 'circumflex' => '600', # U=02C6
+ 'colon' => '600', # U=003A
+ 'comma' => '600', # U=002C
+ 'commaaccent' => '600', # U=F6C3
+ 'copyright' => '600', # U=00A9
+ 'currency' => '600', # U=00A4
+ 'D' => '600', # U=0044
+ 'd' => '600', # U=0064
+ 'dagger' => '600', # U=2020
+ 'daggerdbl' => '600', # U=2021
+ 'Dcaron' => '600', # U=010E
+ 'dcaron' => '600', # U=010F
+ 'Dcroat' => '600', # U=0110
+ 'dcroat' => '600', # U=0111
+ 'degree' => '600', # U=00B0
+ 'Delta' => '600', # U=0394
+ 'dieresis' => '600', # U=00A8
+ 'divide' => '600', # U=00F7
+ 'dollar' => '600', # U=0024
+ 'dotaccent' => '600', # U=02D9
+ 'dotlessi' => '600', # U=0131
+ 'E' => '600', # U=0045
+ 'e' => '600', # U=0065
+ 'Eacute' => '600', # U=00C9
+ 'eacute' => '600', # U=00E9
+ 'Ecaron' => '600', # U=011A
+ 'ecaron' => '600', # U=011B
+ 'Ecircumflex' => '600', # U=00CA
+ 'ecircumflex' => '600', # U=00EA
+ 'Edieresis' => '600', # U=00CB
+ 'edieresis' => '600', # U=00EB
+ 'Edotaccent' => '600', # U=0116
+ 'edotaccent' => '600', # U=0117
+ 'Egrave' => '600', # U=00C8
+ 'egrave' => '600', # U=00E8
+ 'eight' => '600', # U=0038
+ 'ellipsis' => '600', # U=2026
+ 'Emacron' => '600', # U=0112
+ 'emacron' => '600', # U=0113
+ 'emdash' => '600', # U=2014
+ 'endash' => '600', # U=2013
+ 'Eogonek' => '600', # U=0118
+ 'eogonek' => '600', # U=0119
+ 'equal' => '600', # U=003D
+ 'Eth' => '600', # U=00D0
+ 'eth' => '600', # U=00F0
+ 'Euro' => '600', # U=20AC
+ 'exclam' => '600', # U=0021
+ 'exclamdown' => '600', # U=00A1
+ 'F' => '600', # U=0046
+ 'f' => '600', # U=0066
+ 'fi' => '600', # U=FB01
+ 'five' => '600', # U=0035
+ 'fl' => '600', # U=FB02
+ 'florin' => '600', # U=0192
+ 'four' => '600', # U=0034
+ 'fraction' => '600', # U=2044
+ 'G' => '600', # U=0047
+ 'g' => '600', # U=0067
+ 'Gbreve' => '600', # U=011E
+ 'gbreve' => '600', # U=011F
+ 'Gcommaaccent' => '600', # U=0122
+ 'gcommaaccent' => '600', # U=0123
+ 'germandbls' => '600', # U=00DF
+ 'grave' => '600', # U=0060
+ 'greater' => '600', # U=003E
+ 'greaterequal' => '600', # U=2265
+ 'guillemotleft' => '600', # U=00AB
+ 'guillemotright' => '600', # U=00BB
+ 'guilsinglleft' => '600', # U=2039
+ 'guilsinglright' => '600', # U=203A
+ 'H' => '600', # U=0048
+ 'h' => '600', # U=0068
+ 'hungarumlaut' => '600', # U=02DD
+ 'hyphen' => '600', # U=002D
+ 'I' => '600', # U=0049
+ 'i' => '600', # U=0069
+ 'Iacute' => '600', # U=00CD
+ 'iacute' => '600', # U=00ED
+ 'Icircumflex' => '600', # U=00CE
+ 'icircumflex' => '600', # U=00EE
+ 'Idieresis' => '600', # U=00CF
+ 'idieresis' => '600', # U=00EF
+ 'Idotaccent' => '600', # U=0130
+ 'Igrave' => '600', # U=00CC
+ 'igrave' => '600', # U=00EC
+ 'Imacron' => '600', # U=012A
+ 'imacron' => '600', # U=012B
+ 'Iogonek' => '600', # U=012E
+ 'iogonek' => '600', # U=012F
+ 'J' => '600', # U=004A
+ 'j' => '600', # U=006A
+ 'K' => '600', # U=004B
+ 'k' => '600', # U=006B
+ 'Kcommaaccent' => '600', # U=0136
+ 'kcommaaccent' => '600', # U=0137
+ 'L' => '600', # U=004C
+ 'l' => '600', # U=006C
+ 'Lacute' => '600', # U=0139
+ 'lacute' => '600', # U=013A
+ 'Lcaron' => '600', # U=013D
+ 'lcaron' => '600', # U=013E
+ 'Lcommaaccent' => '600', # U=013B
+ 'lcommaaccent' => '600', # U=013C
+ 'less' => '600', # U=003C
+ 'lessequal' => '600', # U=2264
+ 'logicalnot' => '600', # U=00AC
+ 'lozenge' => '600', # U=25CA
+ 'Lslash' => '600', # U=0141
+ 'lslash' => '600', # U=0142
+ 'M' => '600', # U=004D
+ 'm' => '600', # U=006D
+ 'macron' => '600', # U=00AF
+ 'minus' => '600', # U=2212
+ 'mu' => '600', # U=00B5
+ 'multiply' => '600', # U=00D7
+ 'N' => '600', # U=004E
+ 'n' => '600', # U=006E
+ 'Nacute' => '600', # U=0143
+ 'nacute' => '600', # U=0144
+ 'Ncaron' => '600', # U=0147
+ 'ncaron' => '600', # U=0148
+ 'Ncommaaccent' => '600', # U=0145
+ 'ncommaaccent' => '600', # U=0146
+ 'nine' => '600', # U=0039
+ 'notequal' => '600', # U=2260
+ 'Ntilde' => '600', # U=00D1
+ 'ntilde' => '600', # U=00F1
+ 'numbersign' => '600', # U=0023
+ 'O' => '600', # U=004F
+ 'o' => '600', # U=006F
+ 'Oacute' => '600', # U=00D3
+ 'oacute' => '600', # U=00F3
+ 'Ocircumflex' => '600', # U=00D4
+ 'ocircumflex' => '600', # U=00F4
+ 'Odieresis' => '600', # U=00D6
+ 'odieresis' => '600', # U=00F6
+ 'OE' => '600', # U=0152
+ 'oe' => '600', # U=0153
+ 'ogonek' => '600', # U=02DB
+ 'Ograve' => '600', # U=00D2
+ 'ograve' => '600', # U=00F2
+ 'Ohungarumlaut' => '600', # U=0150
+ 'ohungarumlaut' => '600', # U=0151
+ 'Omacron' => '600', # U=014C
+ 'omacron' => '600', # U=014D
+ 'one' => '600', # U=0031
+ 'onehalf' => '600', # U=00BD
+ 'onequarter' => '600', # U=00BC
+ 'onesuperior' => '600', # U=00B9
+ 'ordfeminine' => '600', # U=00AA
+ 'ordmasculine' => '600', # U=00BA
+ 'Oslash' => '600', # U=00D8
+ 'oslash' => '600', # U=00F8
+ 'Otilde' => '600', # U=00D5
+ 'otilde' => '600', # U=00F5
+ 'P' => '600', # U=0050
+ 'p' => '600', # U=0070
+ 'paragraph' => '600', # U=00B6
+ 'parenleft' => '600', # U=0028
+ 'parenright' => '600', # U=0029
+ 'partialdiff' => '600', # U=2202
+ 'percent' => '600', # U=0025
+ 'period' => '600', # U=002E
+ 'periodcentered' => '600', # U=00B7
+ 'perthousand' => '600', # U=2030
+ 'plus' => '600', # U=002B
+ 'plusminus' => '600', # U=00B1
+ 'Q' => '600', # U=0051
+ 'q' => '600', # U=0071
+ 'question' => '600', # U=003F
+ 'questiondown' => '600', # U=00BF
+ 'quotedbl' => '600', # U=0022
+ 'quotedblbase' => '600', # U=201E
+ 'quotedblleft' => '600', # U=201C
+ 'quotedblright' => '600', # U=201D
+ 'quoteleft' => '600', # U=2018
+ 'quoteright' => '600', # U=2019
+ 'quotesinglbase' => '600', # U=201A
+ 'quotesingle' => '600', # U=0027
+ 'R' => '600', # U=0052
+ 'r' => '600', # U=0072
+ 'Racute' => '600', # U=0154
+ 'racute' => '600', # U=0155
+ 'radical' => '600', # U=221A
+ 'Rcaron' => '600', # U=0158
+ 'rcaron' => '600', # U=0159
+ 'Rcommaaccent' => '600', # U=0156
+ 'rcommaaccent' => '600', # U=0157
+ 'registered' => '600', # U=00AE
+ 'ring' => '600', # U=02DA
+ 'S' => '600', # U=0053
+ 's' => '600', # U=0073
+ 'Sacute' => '600', # U=015A
+ 'sacute' => '600', # U=015B
+ 'Scaron' => '600', # U=0160
+ 'scaron' => '600', # U=0161
+ 'Scedilla' => '600', # U=015E
+ 'scedilla' => '600', # U=015F
+ 'Scommaaccent' => '600', # U=0218
+ 'scommaaccent' => '600', # U=0219
+ 'section' => '600', # U=00A7
+ 'semicolon' => '600', # U=003B
+ 'seven' => '600', # U=0037
+ 'six' => '600', # U=0036
+ 'slash' => '600', # U=002F
+ 'space' => '600', # U=0020
+ 'sterling' => '600', # U=00A3
+ 'summation' => '600', # U=2211
+ 'T' => '600', # U=0054
+ 't' => '600', # U=0074
+ 'Tcaron' => '600', # U=0164
+ 'tcaron' => '600', # U=0165
+ 'Tcommaaccent' => '600', # U=021A
+ 'tcommaaccent' => '600', # U=021B
+ 'Thorn' => '600', # U=00DE
+ 'thorn' => '600', # U=00FE
+ 'three' => '600', # U=0033
+ 'threequarters' => '600', # U=00BE
+ 'threesuperior' => '600', # U=00B3
+ 'tilde' => '600', # U=02DC
+ 'trademark' => '600', # U=2122
+ 'two' => '600', # U=0032
+ 'twosuperior' => '600', # U=00B2
+ 'U' => '600', # U=0055
+ 'u' => '600', # U=0075
+ 'Uacute' => '600', # U=00DA
+ 'uacute' => '600', # U=00FA
+ 'Ucircumflex' => '600', # U=00DB
+ 'ucircumflex' => '600', # U=00FB
+ 'Udieresis' => '600', # U=00DC
+ 'udieresis' => '600', # U=00FC
+ 'Ugrave' => '600', # U=00D9
+ 'ugrave' => '600', # U=00F9
+ 'Uhungarumlaut' => '600', # U=0170
+ 'uhungarumlaut' => '600', # U=0171
+ 'Umacron' => '600', # U=016A
+ 'umacron' => '600', # U=016B
+ 'underscore' => '600', # U=005F
+ 'Uogonek' => '600', # U=0172
+ 'uogonek' => '600', # U=0173
+ 'Uring' => '600', # U=016E
+ 'uring' => '600', # U=016F
+ 'V' => '600', # U=0056
+ 'v' => '600', # U=0076
+ 'W' => '600', # U=0057
+ 'w' => '600', # U=0077
+ 'X' => '600', # U=0058
+ 'x' => '600', # U=0078
+ 'Y' => '600', # U=0059
+ 'y' => '600', # U=0079
+ 'Yacute' => '600', # U=00DD
+ 'yacute' => '600', # U=00FD
+ 'Ydieresis' => '600', # U=0178
+ 'ydieresis' => '600', # U=00FF
+ 'yen' => '600', # U=00A5
+ 'Z' => '600', # U=005A
+ 'z' => '600', # U=007A
+ 'Zacute' => '600', # U=0179
+ 'zacute' => '600', # U=017A
+ 'Zcaron' => '600', # U=017D
+ 'zcaron' => '600', # U=017E
+ 'Zdotaccent' => '600', # U=017B
+ 'zdotaccent' => '600', # U=017C
+ 'zero' => '600', # U=0030
},
+ 'comps' => {
+ 'Abreve' => [ 'A', '0', '0', 'breve', '0', '130' ], # U=0102
+ 'abreve' => [ 'A', '0', '0', 'breve', '0', '0' ], # U=0103
+ 'Acaron' => [ 'A', '0', '0', 'caron', '0', '130' ], # U=01CD
+ 'acaron' => [ 'A', '0', '0', 'caron', '0', '0' ], # U=01CE
+ 'Amacron' => [ 'A', '0', '0', 'macron', '0', '130' ], # U=0100
+ 'amacron' => [ 'A', '0', '0', 'macron', '0', '0' ], # U=0101
+ 'Aogonek' => [ 'A', '0', '0', 'ogonek', '0', '0' ], # U=0104
+ 'aogonek' => [ 'A', '0', '0', 'ogonek', '0', '0' ], # U=0105
+ 'Bdotaccent' => [ 'B', '0', '0', 'dotaccent', '0', '130' ], # U=1E02
+ 'bdotaccent' => [ 'B', '0', '0', 'dotaccent', '0', '0' ], # U=1E03
+ 'Cacute' => [ 'C', '0', '0', 'acute', '0', '130' ], # U=0106
+ 'cacute' => [ 'C', '0', '0', 'acute', '0', '0' ], # U=0107
+ 'Ccaron' => [ 'C', '0', '0', 'caron', '0', '130' ], # U=010C
+ 'ccaron' => [ 'C', '0', '0', 'caron', '0', '0' ], # U=010D
+ 'Ccircumflex' => [ 'C', '0', '0', 'circumflex', '0', '130' ], # U=0108
+ 'ccircumflex' => [ 'C', '0', '0', 'circumflex', '0', '0' ], # U=0109
+ 'Cdotaccent' => [ 'C', '0', '0', 'dotaccent', '0', '130' ], # U=010A
+ 'cdotaccent' => [ 'C', '0', '0', 'dotaccent', '0', '0' ], # U=010B
+ 'Dcaron' => [ 'D', '0', '0', 'caron', '0', '130' ], # U=010E
+ 'dcaron' => [ 'D', '0', '0', 'caron', '0', '0' ], # U=010F
+ 'Dcedilla' => [ 'D', '0', '0', 'cedilla', '0', '130' ], # U=1E10
+ 'dcedilla' => [ 'D', '0', '0', 'cedilla', '0', '0' ], # U=1E11
+ 'Ddotaccent' => [ 'D', '0', '0', 'dotaccent', '0', '130' ], # U=1E0A
+ 'ddotaccent' => [ 'D', '0', '0', 'dotaccent', '0', '0' ], # U=1E0B
+ 'Ebreve' => [ 'E', '0', '0', 'breve', '0', '130' ], # U=0114
+ 'ebreve' => [ 'E', '0', '0', 'breve', '0', '0' ], # U=0115
+ 'Ecaron' => [ 'E', '0', '0', 'caron', '0', '130' ], # U=011A
+ 'ecaron' => [ 'E', '0', '0', 'caron', '0', '0' ], # U=011B
+ 'Edotaccent' => [ 'E', '0', '0', 'dotaccent', '0', '130' ], # U=0116
+ 'edotaccent' => [ 'E', '0', '0', 'dotaccent', '0', '0' ], # U=0117
+ 'Emacron' => [ 'E', '0', '0', 'macron', '0', '130' ], # U=0112
+ 'emacron' => [ 'E', '0', '0', 'macron', '0', '0' ], # U=0113
+ 'Eogonek' => [ 'E', '0', '0', 'ogonek', '0', '0' ], # U=0118
+ 'eogonek' => [ 'E', '0', '0', 'ogonek', '0', '0' ], # U=0119
+ 'Etilde' => [ 'E', '0', '0', 'tilde', '0', '130' ], # U=1EBC
+ 'etilde' => [ 'E', '0', '0', 'tilde', '0', '0' ], # U=1EBD
+ 'Fdotaccent' => [ 'F', '0', '0', 'dotaccent', '0', '130' ], # U=1E1E
+ 'fdotaccent' => [ 'F', '0', '0', 'dotaccent', '0', '0' ], # U=1E1F
+ 'Gacute' => [ 'G', '0', '0', 'acute', '0', '130' ], # U=01F4
+ 'gacute' => [ 'G', '0', '0', 'acute', '0', '0' ], # U=01F5
+ 'Gbreve' => [ 'G', '0', '0', 'breve', '0', '130' ], # U=011E
+ 'gbreve' => [ 'G', '0', '0', 'breve', '0', '0' ], # U=011F
+ 'Gcaron' => [ 'G', '0', '0', 'caron', '0', '136' ], # U=01E6
+ 'gcaron' => [ 'g', '0', '0', 'caron', '-30', '0' ], # U=01E7
+ 'Gcedilla' => [ 'G', '0', '0', 'cedilla', '0', '130' ], # U=0122
+ 'gcedilla' => [ 'G', '0', '0', 'cedilla', '0', '0' ], # U=0123
+ 'Gcircumflex' => [ 'G', '0', '0', 'circumflex', '0', '130' ], # U=011C
+ 'gcircumflex' => [ 'G', '0', '0', 'circumflex', '0', '0' ], # U=011D
+ 'Gdotaccent' => [ 'G', '0', '0', 'dotaccent', '0', '130' ], # U=0120
+ 'gdotaccent' => [ 'G', '0', '0', 'dotaccent', '0', '0' ], # U=0121
+ 'Gmacron' => [ 'G', '0', '0', 'macron', '0', '130' ], # U=1E20
+ 'gmacron' => [ 'G', '0', '0', 'macron', '0', '0' ], # U=1E21
+ 'Hcedilla' => [ 'H', '0', '0', 'cedilla', '0', '130' ], # U=1E28
+ 'hcedilla' => [ 'H', '0', '0', 'cedilla', '0', '0' ], # U=1E29
+ 'Hcircumflex' => [ 'H', '0', '0', 'circumflex', '0', '130' ], # U=0124
+ 'hcircumflex' => [ 'H', '0', '0', 'circumflex', '0', '0' ], # U=0125
+ 'Hdieresis' => [ 'H', '0', '0', 'dieresis', '0', '130' ], # U=1E26
+ 'hdieresis' => [ 'H', '0', '0', 'dieresis', '0', '0' ], # U=1E27
+ 'Hdotaccent' => [ 'H', '0', '0', 'dotaccent', '0', '130' ], # U=1E22
+ 'hdotaccent' => [ 'H', '0', '0', 'dotaccent', '0', '0' ], # U=1E23
+ 'Ibreve' => [ 'I', '0', '0', 'breve', '0', '130' ], # U=012C
+ 'ibreve' => [ 'I', '0', '0', 'breve', '0', '0' ], # U=012D
+ 'Icaron' => [ 'I', '0', '0', 'caron', '0', '130' ], # U=01CF
+ 'icaron' => [ 'I', '0', '0', 'caron', '0', '0' ], # U=01D0
+ 'Idotaccent' => [ 'I', '0', '0', 'dotaccent', '0', '130' ], # U=0130
+ 'Imacron' => [ 'I', '0', '0', 'macron', '0', '130' ], # U=012A
+ 'imacron' => [ 'I', '0', '0', 'macron', '0', '0' ], # U=012B
+ 'Iogonek' => [ 'I', '0', '0', 'ogonek', '0', '0' ], # U=012E
+ 'iogonek' => [ 'I', '0', '0', 'ogonek', '0', '0' ], # U=012F
+ 'Itilde' => [ 'I', '0', '0', 'tilde', '0', '130' ], # U=0128
+ 'itilde' => [ 'I', '0', '0', 'tilde', '0', '0' ], # U=0129
+ 'Jcircumflex' => [ 'J', '0', '0', 'circumflex', '0', '130' ], # U=0134
+ 'jcircumflex' => [ 'J', '0', '0', 'circumflex', '0', '0' ], # U=0135
+ 'Kacute' => [ 'K', '0', '0', 'acute', '0', '130' ], # U=1E30
+ 'kacute' => [ 'K', '0', '0', 'acute', '0', '0' ], # U=1E31
+ 'Kcaron' => [ 'K', '0', '0', 'caron', '0', '130' ], # U=01E8
+ 'kcaron' => [ 'K', '0', '0', 'caron', '0', '0' ], # U=01E9
+ 'Kcedilla' => [ 'K', '0', '0', 'cedilla', '0', '130' ], # U=0136
+ 'kcedilla' => [ 'K', '0', '0', 'cedilla', '0', '0' ], # U=0137
+ 'Lacute' => [ 'L', '0', '0', 'acute', '0', '130' ], # U=0139
+ 'lacute' => [ 'L', '0', '0', 'acute', '0', '0' ], # U=013A
+ 'Lcaron' => [ 'L', '0', '0', 'caron', '0', '130' ], # U=013D
+ 'lcaron' => [ 'L', '0', '0', 'caron', '0', '0' ], # U=013E
+ 'Lcedilla' => [ 'L', '0', '0', 'cedilla', '0', '130' ], # U=013B
+ 'lcedilla' => [ 'L', '0', '0', 'cedilla', '0', '0' ], # U=013C
+ 'Ldotaccent' => [ 'L', '0', '0', 'dotaccent', '0', '130' ], # U=013F
+ 'ldotaccent' => [ 'L', '0', '0', 'dotaccent', '0', '0' ], # U=0140
+ 'Macute' => [ 'M', '0', '0', 'acute', '0', '130' ], # U=1E3E
+ 'macute' => [ 'M', '0', '0', 'acute', '0', '0' ], # U=1E3F
+ 'Mdotaccent' => [ 'M', '0', '0', 'dotaccent', '0', '130' ], # U=1E40
+ 'mdotaccent' => [ 'M', '0', '0', 'dotaccent', '0', '0' ], # U=1E41
+ 'Nacute' => [ 'N', '0', '0', 'acute', '0', '130' ], # U=0143
+ 'nacute' => [ 'N', '0', '0', 'acute', '0', '0' ], # U=0144
+ 'Ncaron' => [ 'N', '0', '0', 'caron', '0', '130' ], # U=0147
+ 'ncaron' => [ 'N', '0', '0', 'caron', '0', '0' ], # U=0148
+ 'Ncedilla' => [ 'N', '0', '0', 'cedilla', '0', '130' ], # U=0145
+ 'ncedilla' => [ 'N', '0', '0', 'cedilla', '0', '0' ], # U=0146
+ 'Ndotaccent' => [ 'N', '0', '0', 'dotaccent', '0', '130' ], # U=1E44
+ 'ndotaccent' => [ 'N', '0', '0', 'dotaccent', '0', '0' ], # U=1E45
+ 'Obreve' => [ 'O', '0', '0', 'breve', '0', '130' ], # U=014E
+ 'obreve' => [ 'O', '0', '0', 'breve', '0', '0' ], # U=014F
+ 'Ocaron' => [ 'O', '0', '0', 'caron', '0', '130' ], # U=01D1
+ 'ocaron' => [ 'O', '0', '0', 'caron', '0', '0' ], # U=01D2
+ 'Ohungarumlaut' => [ 'O', '0', '0', 'hungarumlaut', '0', '130' ], # U=0150
+ 'ohungarumlaut' => [ 'O', '0', '0', 'hungarumlaut', '0', '0' ], # U=0151
+ 'Omacron' => [ 'O', '0', '0', 'macron', '0', '130' ], # U=014C
+ 'omacron' => [ 'O', '0', '0', 'macron', '0', '0' ], # U=014D
+ 'Oogonek' => [ 'O', '0', '0', 'ogonek', '0', '0' ], # U=01EA
+ 'oogonek' => [ 'O', '0', '0', 'ogonek', '0', '0' ], # U=01EB
+ 'Pacute' => [ 'P', '0', '0', 'acute', '0', '130' ], # U=1E54
+ 'pacute' => [ 'P', '0', '0', 'acute', '0', '0' ], # U=1E55
+ 'Pdotaccent' => [ 'P', '0', '0', 'dotaccent', '0', '130' ], # U=1E56
+ 'pdotaccent' => [ 'P', '0', '0', 'dotaccent', '0', '0' ], # U=1E57
+ 'Racute' => [ 'R', '0', '0', 'acute', '0', '130' ], # U=0154
+ 'racute' => [ 'R', '0', '0', 'acute', '0', '0' ], # U=0155
+ 'Rcaron' => [ 'R', '0', '0', 'caron', '0', '130' ], # U=0158
+ 'rcaron' => [ 'R', '0', '0', 'caron', '0', '0' ], # U=0159
+ 'Rcedilla' => [ 'R', '0', '0', 'cedilla', '0', '130' ], # U=0156
+ 'rcedilla' => [ 'R', '0', '0', 'cedilla', '0', '0' ], # U=0157
+ 'Rdotaccent' => [ 'R', '0', '0', 'dotaccent', '0', '130' ], # U=1E58
+ 'rdotaccent' => [ 'R', '0', '0', 'dotaccent', '0', '0' ], # U=1E59
+ 'Sacute' => [ 'S', '0', '0', 'acute', '0', '130' ], # U=015A
+ 'sacute' => [ 'S', '0', '0', 'acute', '0', '0' ], # U=015B
+ 'Scaron' => [ 'S', '0', '0', 'caron', '30', '136' ], # U=0160
+ 'scaron' => [ 's', '0', '0', 'caron', '0', '0' ], # U=0161
+ 'Scedilla' => [ 'S', '0', '0', 'cedilla', '0', '130' ], # U=015E
+ 'scedilla' => [ 'S', '0', '0', 'cedilla', '0', '0' ], # U=015F
+ 'Scircumflex' => [ 'S', '0', '0', 'circumflex', '0', '130' ], # U=015C
+ 'scircumflex' => [ 'S', '0', '0', 'circumflex', '0', '0' ], # U=015D
+ 'Sdotaccent' => [ 'S', '0', '0', 'dotaccent', '0', '130' ], # U=1E60
+ 'sdotaccent' => [ 'S', '0', '0', 'dotaccent', '0', '0' ], # U=1E61
+ 'Tcaron' => [ 'T', '0', '0', 'caron', '0', '130' ], # U=0164
+ 'tcaron' => [ 'T', '0', '0', 'caron', '0', '0' ], # U=0165
+ 'Tcedilla' => [ 'T', '0', '0', 'cedilla', '0', '130' ], # U=0162
+ 'tcedilla' => [ 'T', '0', '0', 'cedilla', '0', '0' ], # U=0163
+ 'Tdotaccent' => [ 'T', '0', '0', 'dotaccent', '0', '130' ], # U=1E6A
+ 'tdotaccent' => [ 'T', '0', '0', 'dotaccent', '0', '0' ], # U=1E6B
+ 'Ubreve' => [ 'U', '0', '0', 'breve', '0', '130' ], # U=016C
+ 'ubreve' => [ 'U', '0', '0', 'breve', '0', '0' ], # U=016D
+ 'Ucaron' => [ 'U', '0', '0', 'caron', '0', '130' ], # U=01D3
+ 'ucaron' => [ 'U', '0', '0', 'caron', '0', '0' ], # U=01D4
+ 'Uhungarumlaut' => [ 'U', '0', '0', 'hungarumlaut', '0', '130' ], # U=0170
+ 'uhungarumlaut' => [ 'U', '0', '0', 'hungarumlaut', '0', '0' ], # U=0171
+ 'Umacron' => [ 'U', '0', '0', 'macron', '0', '130' ], # U=016A
+ 'umacron' => [ 'U', '0', '0', 'macron', '0', '0' ], # U=016B
+ 'Uogonek' => [ 'U', '0', '0', 'ogonek', '0', '0' ], # U=0172
+ 'uogonek' => [ 'U', '0', '0', 'ogonek', '0', '0' ], # U=0173
+ 'Uring' => [ 'U', '0', '0', 'ring', '0', '130' ], # U=016E
+ 'uring' => [ 'U', '0', '0', 'ring', '0', '0' ], # U=016F
+ 'Utilde' => [ 'U', '0', '0', 'tilde', '0', '130' ], # U=0168
+ 'utilde' => [ 'U', '0', '0', 'tilde', '0', '0' ], # U=0169
+ 'Vtilde' => [ 'V', '0', '0', 'tilde', '0', '130' ], # U=1E7C
+ 'vtilde' => [ 'V', '0', '0', 'tilde', '0', '0' ], # U=1E7D
+ 'Wacute' => [ 'W', '0', '0', 'acute', '0', '130' ], # U=1E82
+ 'wacute' => [ 'W', '0', '0', 'acute', '0', '0' ], # U=1E83
+ 'Wcircumflex' => [ 'W', '0', '0', 'circumflex', '0', '130' ], # U=0174
+ 'wcircumflex' => [ 'W', '0', '0', 'circumflex', '0', '0' ], # U=0175
+ 'Wdieresis' => [ 'W', '0', '0', 'dieresis', '0', '130' ], # U=1E84
+ 'wdieresis' => [ 'W', '0', '0', 'dieresis', '0', '0' ], # U=1E85
+ 'Wdotaccent' => [ 'W', '0', '0', 'dotaccent', '0', '130' ], # U=1E86
+ 'wdotaccent' => [ 'W', '0', '0', 'dotaccent', '0', '0' ], # U=1E87
+ 'Wgrave' => [ 'W', '0', '0', 'grave', '0', '130' ], # U=1E80
+ 'wgrave' => [ 'W', '0', '0', 'grave', '0', '0' ], # U=1E81
+ 'Xdieresis' => [ 'X', '0', '0', 'dieresis', '0', '130' ], # U=1E8C
+ 'xdieresis' => [ 'X', '0', '0', 'dieresis', '0', '0' ], # U=1E8D
+ 'Xdotaccent' => [ 'X', '0', '0', 'dotaccent', '0', '130' ], # U=1E8A
+ 'xdotaccent' => [ 'X', '0', '0', 'dotaccent', '0', '0' ], # U=1E8B
+ 'Ycircumflex' => [ 'Y', '0', '0', 'circumflex', '0', '130' ], # U=0176
+ 'ycircumflex' => [ 'Y', '0', '0', 'circumflex', '0', '0' ], # U=0177
+ 'Ydieresis' => [ 'Y', '0', '0', 'dieresis', '0', '136' ], # U=0178
+ 'Ydotaccent' => [ 'Y', '0', '0', 'dotaccent', '0', '130' ], # U=1E8E
+ 'ydotaccent' => [ 'Y', '0', '0', 'dotaccent', '0', '0' ], # U=1E8F
+ 'Ygrave' => [ 'Y', '0', '0', 'grave', '0', '130' ], # U=1EF2
+ 'ygrave' => [ 'Y', '0', '0', 'grave', '0', '0' ], # U=1EF3
+ 'Ytilde' => [ 'Y', '0', '0', 'tilde', '0', '130' ], # U=1EF8
+ 'ytilde' => [ 'Y', '0', '0', 'tilde', '0', '0' ], # U=1EF9
+ 'Zacute' => [ 'Z', '0', '0', 'acute', '0', '130' ], # U=0179
+ 'zacute' => [ 'Z', '0', '0', 'acute', '0', '0' ], # U=017A
+ 'Zcaron' => [ 'Z', '0', '0', 'caron', '0', '136' ], # U=017D
+ 'zcaron' => [ 'z', '0', '0', 'caron', '10', '0' ], # U=017E
+ 'Zcircumflex' => [ 'Z', '0', '0', 'circumflex', '0', '130' ], # U=1E90
+ 'zcircumflex' => [ 'Z', '0', '0', 'circumflex', '0', '0' ], # U=1E91
+ 'Zdotaccent' => [ 'Z', '0', '0', 'dotaccent', '0', '130' ], # U=017B
+ 'zdotaccent' => [ 'Z', '0', '0', 'dotaccent', '0', '0' ], # U=017C
+ },
};
@@ -636,6 +822,12 @@
=head1 HISTORY
$Log: courier.pm,v $
+ Revision 1.11 2005/09/28 17:00:52 fredo
+ added composites
+
+ Revision 1.10 2005/09/26 19:28:16 fredo
+ no message
+
Revision 1.9 2005/09/12 16:56:21 fredo
applied mod_perl patch by Paul Schilling <pfschill at sbcglobal.net>
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/CoreFont.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -38,7 +38,7 @@
# FREE SOFTWARE FOUNDATION, INC., 59 TEMPLE PLACE - SUITE 330,
# BOSTON, MA 02111-1307, USA.
#
-# $Id: CoreFont.pm,v 1.14 2005/09/12 16:56:20 fredo Exp $
+# $Id: CoreFont.pm,v 1.17 2005/10/19 19:15:12 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::Font::CoreFont;
@@ -76,7 +76,7 @@
@ISA=qw(PDF::API2::Resource::Font);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.14 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/09/12 16:56:20 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.17 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/19 19:15:12 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -108,9 +108,9 @@
eval "require PDF::API2::Resource::Font::CoreFont::$fname; ";
unless($@)
{
- no strict 'refs';
+ no strict 'refs';
my $obj = "PDF::API2::Resource::Font::CoreFont::".$fname;
- $fonts->{$fname} = deep_copy(${$obj."::FONTDATA"});
+ $fonts->{$fname} = deep_copy(${$obj."::FONTDATA"});
$fonts->{$fname}->{uni}||=[];
foreach my $n (0..255)
{
@@ -133,31 +133,31 @@
my $this = shift;
if (not ref $this)
{
- $this;
+ $this;
}
elsif (ref $this eq "ARRAY")
{
- [map &deep_copy($_), @$this];
+ [map &deep_copy($_), @$this];
}
elsif (ref $this eq "HASH")
{
- +{map { $_ => &deep_copy($this->{$_}) } keys %$this};
+ +{map { $_ => &deep_copy($this->{$_}) } keys %$this};
}
elsif (ref $this eq "CODE")
{
- # Can't deep copy code refs
- return $this;
+ # Can't deep copy code refs
+ return $this;
}
else
{
- die "what type is $_?";
+ die "what type is $_?";
}
}
sub _look_for_fontfile ($)
{
my $fname=shift;
- my $fpath;
+ my $fpath=undef;
foreach my $dir (@INC)
{
$fpath="$dir/PDF/API2/Resource/Font/CoreFont/$fname";
@@ -167,6 +167,19 @@
return($fpath);
}
+sub _look_for_fontmetricfile ($)
+{
+ my $fname=shift;
+ my $fpath=undef;
+ foreach my $dir (@INC)
+ {
+ $fpath="$dir/PDF/API2/Resource/Font/CoreFont/$fname.fm";
+ last if(-f $fpath);
+ $fpath=undef;
+ }
+ return($fpath);
+}
+
sub new
{
my ($class,$pdf,$name, at opts) = @_;
@@ -197,11 +210,11 @@
{
unless(defined $opts{-metrics})
{
- $data={_look_for_font($lookname)};
+ $data={_look_for_font($lookname)};
}
else
{
- $data={%{$opts{-metrics}}};
+ $data={%{$opts{-metrics}}};
}
}
@@ -226,13 +239,13 @@
#}
$class = ref $class if ref $class;
- $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey());
+ $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey().'~'.time());
$pdf->new_obj($self) unless($self->is_obj($pdf));
$self->{' data'}=$data;
+ $self->{-dokern}=1 if($opts{-dokern});
$self->{'Subtype'} = PDFName($self->data->{type});
$self->{'BaseFont'} = PDFName($self->fontname);
-
if($opts{-pdfname})
{
$self->name($opts{-pdfname});
@@ -451,6 +464,15 @@
=head1 HISTORY
$Log: CoreFont.pm,v $
+ Revision 1.17 2005/10/19 19:15:12 fredo
+ added handling of optional kerning
+
+ Revision 1.16 2005/10/01 22:41:07 fredo
+ fixed font-naming race condition for multiple document updates
+
+ Revision 1.15 2005/09/26 20:07:19 fredo
+ added fontmetric stub
+
Revision 1.14 2005/09/12 16:56:20 fredo
applied mod_perl patch by Paul Schilling <pfschill at sbcglobal.net>
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/Postscript.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/Postscript.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font/Postscript.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Postscript.pm,v 1.9 2005/06/17 19:44:03 fredo Exp $
+# $Id: Postscript.pm,v 1.13 2005/10/19 23:05:17 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::Font::Postscript;
@@ -48,7 +48,7 @@
@ISA = qw( PDF::API2::Resource::Font );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.9 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:03 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.13 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/19 23:05:17 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -75,34 +75,43 @@
}
$class = ref $class if ref $class;
- $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey());
+ $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey().'~'.time());
$pdf->new_obj($self) unless($self->is_obj($pdf));
$self->{' data'}=$data;
- $self->{'Subtype'} = PDFName("Type1");
- $self->{'BaseFont'} = PDFName($self->fontname);
-
if($opts{-pdfname}) {
$self->name($opts{-pdfname});
}
+ $self->{'Subtype'} = PDFName("Type1");
$self->{'FontDescriptor'}=$self->descrByData();
+ if(-f $psfile)
+ {
+ $self->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname).'~'.time());
- my ($l1,$l2,$l3,$stream)=$self->readPFAPFB($psfile);
+ my ($l1,$l2,$l3,$stream)=$self->readPFAPFB($psfile);
- my $s = PDFDict();
- $self->{'FontDescriptor'}->{'FontFile'} = $s;
- $s->{'Length1'} = PDFNum($l1);
- $s->{'Length2'} = PDFNum($l2);
- $s->{'Length3'} = PDFNum($l3);
- $s->{'Filter'} = PDFArray(PDFName("FlateDecode"));
- $s->{' stream'} = $stream;
- if(defined $pdf) {
- $pdf->new_obj($s);
+ my $s = PDFDict();
+ $self->{'FontDescriptor'}->{'FontFile'} = $s;
+ $s->{'Length1'} = PDFNum($l1);
+ $s->{'Length2'} = PDFNum($l2);
+ $s->{'Length3'} = PDFNum($l3);
+ $s->{'Filter'} = PDFArray(PDFName("FlateDecode"));
+ $s->{' stream'} = $stream;
+ if(defined $pdf) {
+ $pdf->new_obj($s);
+ }
}
+ else
+ {
+ $self->{'BaseFont'} = PDFName($self->fontname);
+ }
$self->encodeByData($opts{-encode});
+ $self->{-nocomps}=1 if($opts{-nocomps});
+ $self->{-dokern}=1 if($opts{-dokern});
+
return($self);
}
@@ -192,7 +201,8 @@
# $datahashref = $self->readAFM( $afmfile );
-sub readAFM {
+sub readAFM
+{
my ($self,$file)=@_;
my $data={};
$data->{wx}={};
@@ -204,10 +214,10 @@
if(! -e $file) {die "file='$file' not existant.";}
open(AFMF, $file) or die "Can't find the AFM file for $file";
local($/, $_) = ("\n", undef); # ensure correct $INPUT_RECORD_SEPARATOR
- while ($_=<AFMF>) {
- next if /^StartKernData/ .. /^EndKernData/; # kern data not parsed yet
- next if /^StartComposites/ .. /^EndComposites/; # same for composites
- if (/^StartCharMetrics/ .. /^EndCharMetrics/) {
+ while ($_=<AFMF>)
+ {
+ if (/^StartCharMetrics/ .. /^EndCharMetrics/)
+ {
# only lines that start with "C" or "CH" are parsed
next unless $_=~/^CH?\s/;
my($ch) = $_=~/^CH?\s+(\d+)\s*;/;
@@ -228,23 +238,55 @@
$data->{firstchar} = $data->{firstchar}>$ch ? $ch : $data->{firstchar};
next;
}
+ elsif(/^StartKernData/ .. /^EndKernData/)
+ {
+ $data->{kern}||={};
+ if($_=~m|^KPX\s+(\S+)\s+(\S+)\s+(\S+)\s*$|i)
+ {
+ $data->{kern}->{"$1:$2"}=$3;
+ }
+ }
+ elsif(/^StartComposites/ .. /^EndComposites/)
+ {
+ $data->{comps}||={};
+ if($_=~m|^CC\s+(\S+)\s+(\S+)\s+;|i)
+ {
+ my ($name,$comp)=($1,$2);
+ my @cv=split(/;/,$_);
+ shift @cv;
+ my $rng=[];
+ foreach (1..$comp)
+ {
+ my @c1=split(/\s+/,shift @cv);
+ push @{$rng},$c1[1],$c1[2],$c1[3];
+ }
+ $data->{comps}->{$name}=$rng;
+ }
+ }
last if $_=~/^EndFontMetrics/;
- if (/(^\w+)\s+(.*)/) {
+ if (/(^\w+)\s+(.*)/)
+ {
my($key,$val) = ($1, $2);
$key = lc $key;
- if (defined $data->{$key}) {
+ if (defined $data->{$key})
+ {
# $data->{$key} = [ $data->{$key} ] unless ref $data->{$key};
# push(@{$data->{$key}}, $val);
- } else {
+ }
+ else
+ {
$val=~s/[\x00\x1f]+//g;
$data->{$key} = $val;
}
- } else {
- print STDERR "Can't parse: $_";
+ }
+ else
+ {
+ ## print STDERR "Can't parse: $_";
}
}
close(AFMF);
- unless (exists $data->{wx}->{'.notdef'}) {
+ unless (exists $data->{wx}->{'.notdef'})
+ {
$data->{wx}->{'.notdef'} = 0;
$data->{bbox}{'.notdef'} = [0, 0, 0, 0];
}
@@ -252,11 +294,15 @@
$data->{avgwidth2} /= scalar keys %{$data->{bbox}} ;
$data->{avgwidth2} = int($data->{avgwidth2});
- $data->{fontname}=~s/[^A-Za-z0-9]+//og;
+ $data->{fontname}=~s/[\x00-\x20]+//og;
+ ## $data->{fontname}=~s/[^A-Za-z0-9]+//og;
- if(defined $data->{fullname}) {
+ if(defined $data->{fullname})
+ {
$data->{altname}=$data->{fullname};
- } else {
+ }
+ else
+ {
$data->{altname}=$data->{familyname};
$data->{altname}.=' Italic' if($data->{italicangle}<0);
$data->{altname}.=' Oblique' if($data->{italicangle}>0);
@@ -280,10 +326,12 @@
$data->{flags} = 34;
$data->{uni}||=[];
- foreach my $n (0..255) {
+ foreach my $n (0..255)
+ {
$data->{uni}->[$n]=uniByName($data->{char}->[$n] || '.notdef') || 0;
}
-
+ delete $data->{bbox};
+
return($data);
}
@@ -516,6 +564,19 @@
=head1 HISTORY
$Log: Postscript.pm,v $
+ Revision 1.13 2005/10/19 23:05:17 fredo
+ silenced 'cannot parse' since it is usually no error
+
+ Revision 1.12 2005/10/19 19:12:35 fredo
+ added handling of optional kerning
+
+ Revision 1.11 2005/10/01 23:38:00 fredo
+ added kerning+composite parsing
+ added nonembedding check
+
+ Revision 1.10 2005/10/01 22:41:07 fredo
+ fixed font-naming race condition for multiple document updates
+
Revision 1.9 2005/06/17 19:44:03 fredo
fixed CPAN modulefile versioning (again)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/Font.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Font.pm,v 1.15 2005/06/17 19:44:03 fredo Exp $
+# $Id: Font.pm,v 1.17 2005/10/19 19:07:15 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::Font;
@@ -47,7 +47,7 @@
@ISA = qw( PDF::API2::Resource::BaseFont );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.15 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:03 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.17 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/19 19:07:15 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -190,35 +190,46 @@
foreach my $n (0..255) {
delete $gl{$self->data->{e2n}->[$n]};
}
+
+ if(defined $self->data->{comps} && !$self->{-nocomps})
+ {
+ foreach my $n (keys %{$self->data->{comps}})
+ {
+ delete $gl{$n};
+ }
+ }
-# my @nm=sort { lc($a) eq lc($b) ? $a cmp $b : lc($a) cmp lc($b) } keys %gl;
- my @nm=sort { $gl{$a}<=>$gl{$b} } keys %gl;
- #splice(@nm,223);
+ my @nm=sort { $gl{$a} <=> $gl{$b} } keys %gl;
+
my @fnts=();
my $count=0;
- while(@glyphs=splice(@nm,0,223)) {
-
+ while(@glyphs=splice(@nm,0,223))
+ {
my $obj=$self->SUPER::new($self->{' apipdf'},$self->name.'am'.$count);
$obj->{' data'}={ %{$self->data} };
$obj->data->{firstchar}=32;
$obj->data->{lastchar}=32+scalar(@glyphs);
push @fnts,$obj;
- foreach my $key (qw( Subtype BaseFont FontDescriptor )) {
+ foreach my $key (qw( Subtype BaseFont FontDescriptor ))
+ {
$obj->{$key}=$self->{$key} if(defined $self->{$key});
}
$obj->data->{char}=[];
$obj->data->{uni}=[];
- foreach my $n (0..31) {
+ foreach my $n (0..31)
+ {
$obj->data->{char}->[$n]='.notdef';
$obj->data->{uni}->[$n]=0;
}
$obj->data->{char}->[32]='space';
$obj->data->{uni}->[32]=32;
- foreach my $n (33..$obj->data->{lastchar}) {
+ foreach my $n (33..$obj->data->{lastchar})
+ {
$obj->data->{char}->[$n]=$glyphs[$n-33];
$obj->data->{uni}->[$n]=$gl{$glyphs[$n-33]};
}
- foreach my $n (($obj->data->{lastchar}+1)..255) {
+ foreach my $n (($obj->data->{lastchar}+1)..255)
+ {
$obj->data->{char}->[$n]='.notdef';
$obj->data->{uni}->[$n]=0;
}
@@ -255,6 +266,12 @@
=head1 HISTORY
$Log: Font.pm,v $
+ Revision 1.17 2005/10/19 19:07:15 fredo
+ added handling of composites in automap
+
+ Revision 1.16 2005/09/26 20:06:02 fredo
+ removed composite glyphs from automap
+
Revision 1.15 2005/06/17 19:44:03 fredo
fixed CPAN modulefile versioning (again)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: UniFont.pm,v 1.7 2005/06/17 19:44:03 fredo Exp $
+# $Id: UniFont.pm,v 1.8 2005/10/19 19:08:44 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::UniFont;
@@ -43,7 +43,7 @@
use vars qw($VERSION);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.7 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:03 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.8 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/19 19:08:44 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -213,21 +213,57 @@
my ($self,$text)=@_;
$text=decode($self->{encode},$text) unless(is_utf8($text));
my $width=0;
- foreach my $u (unpack('U*',$text))
+ if(1)
{
- if(defined $self->{code}->{$u})
+ my @blks=();
+ foreach my $u (unpack('U*',$text))
{
- $width+=$self->fontlist->[$self->{code}->{$u}]->width(pack('U',$u));
+ my $fn=0;
+ if(defined $self->{code}->{$u})
+ {
+ $fn=$self->{code}->{$u};
+ }
+ elsif(defined $self->{block}->{($u>>8)})
+ {
+ $fn=$self->{block}->{($u>>8)};
+ }
+ else
+ {
+ $fn=0;
+ }
+ if(scalar @blks==0 || $blks[-1]->[0]!=$fn)
+ {
+ push @blks,[$fn,pack('U',$u)];
+ }
+ else
+ {
+ $blks[-1]->[1].=pack('U',$u);
+ }
}
- elsif(defined $self->{block}->{($u>>8)})
+ foreach my $blk (@blks)
{
- $width+=$self->fontlist->[$self->{block}->{($u>>8)}]->width(pack('U',$u));
+ $width+=$self->fontlist->[$blk->[0]]->width($blk->[1]);
}
- else
+ }
+ else
+ {
+ foreach my $u (unpack('U*',$text))
{
- $width+=$self->fontlist->[0]->width(pack('U',$u));
+ if(defined $self->{code}->{$u})
+ {
+ $width+=$self->fontlist->[$self->{code}->{$u}]->width(pack('U',$u));
+ }
+ elsif(defined $self->{block}->{($u>>8)})
+ {
+ $width+=$self->fontlist->[$self->{block}->{($u>>8)}]->width(pack('U',$u));
+ }
+ else
+ {
+ $width+=$self->fontlist->[0]->width(pack('U',$u));
+ }
}
}
+
return($width);
}
@@ -266,7 +302,8 @@
if(scalar @codes > 0)
{
my $f=$self->fontlist->[$lastfont];
- $newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes)).' Tj ';
+ ## $newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes)).' Tj ';
+ $newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes),$size).' ';
}
return($newtext);
@@ -274,4 +311,4 @@
1;
-__END__
\ No newline at end of file
+__END__
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/XObject/Image/JPEG.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/XObject/Image/JPEG.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/XObject/Image/JPEG.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: JPEG.pm,v 1.10 2005/06/17 19:44:04 fredo Exp $
+# $Id: JPEG.pm,v 1.11 2005/09/28 17:02:47 fredo Exp $
#
#=======================================================================
package PDF::API2::Resource::XObject::Image::JPEG;
@@ -44,7 +44,7 @@
@ISA = qw( PDF::API2::Resource::XObject::Image );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.10 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/06/17 19:44:04 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 1.11 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/09/28 17:02:47 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -55,7 +55,8 @@
=cut
-sub new {
+sub new
+{
my ($class,$pdf,$file,$name) = @_;
my $self;
my $fh = IO::File->new;
@@ -67,19 +68,25 @@
$self->{' apipdf'}=$pdf;
- if(ref $file) {
+ if(ref $file)
+ {
$fh=$file;
- } else {
+ }
+ else
+ {
open($fh,$file);
}
binmode($fh,':raw');
$self->read_jpeg($fh);
- if(ref($file) eq 'PDF::API2::IOString') {
- $self->{' stream'}=$fh->{buf};
+ if(ref($file) eq 'PDF::API2::IOString')
+ {
+ $self->{' stream'}=${*$fh->{buf}};
$self->{Length}=PDFNum(length $self->{' stream'});
- } elsif(ref $file) {
+ }
+ elsif(ref $file)
+ {
seek($fh,0,0);
$self->{' stream'}='';
my $buf='';
@@ -88,7 +95,9 @@
$self->{' stream'}.=$buf;
}
$self->{Length}=PDFNum(length $self->{' stream'});
- } else {
+ }
+ else
+ {
$self->{Length}=PDFNum(-s $file);
$self->{' streamfile'}=$file;
}
@@ -169,6 +178,9 @@
=head1 HISTORY
$Log: JPEG.pm,v $
+ Revision 1.11 2005/09/28 17:02:47 fredo
+ fixed iostring handling
+
Revision 1.10 2005/06/17 19:44:04 fredo
fixed CPAN modulefile versioning (again)
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/uniglyph.txt
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/uniglyph.txt 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/uniglyph.txt 2005-10-24 17:11:49 UTC (rev 1450)
@@ -16,12 +16,17 @@
0x0007 ; controlBEL ; 6 # Adobe Glyph List (Sept/02) # <control>
0x0008 ; tilde ; 1 # Substitution Candidate
0x0008 ; controlBS ; 6 # Adobe Glyph List (Sept/02) # <control>
-0x0009 ; dotlessi ; 1 # Substitution Candidate
+0x0009 ; breve ; 1 # Substitution Candidate
0x0009 ; controlHT ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x000A ; ogonek ; 1 # Substitution Candidate
0x000A ; controlLF ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x000B ; dotaccent ; 1 # Substitution Candidate
0x000B ; controlVT ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x000C ; hungarumlaut ; 1 # Substitution Candidate
0x000C ; controlFF ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x000D ; cedilla ; 1 # Substitution Candidate
0x000D ; controlCR ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x000E ; dblgrave ; 1 # Substitution Candidate
0x000E ; controlSO ; 6 # Adobe Glyph List (Sept/02) # <control>
0x000F ; controlSI ; 6 # Adobe Glyph List (Sept/02) # <control>
0x0010 ; controlDLE ; 6 # Adobe Glyph List (Sept/02) # <control>
@@ -38,7 +43,9 @@
0x001B ; controlESC ; 6 # Adobe Glyph List (Sept/02) # <control>
0x001C ; controlFS ; 6 # Adobe Glyph List (Sept/02) # <control>
0x001D ; controlGS ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x001E ; dotlessi ; 1 # Substitution Candidate
0x001E ; controlRS ; 6 # Adobe Glyph List (Sept/02) # <control>
+0x001F ; dotlessj ; 1 # Substitution Candidate
0x001F ; controlUS ; 6 # Adobe Glyph List (Sept/02) # <control>
0x0020 ; space ; 0 # Adobe Glyph List FN (v1.3) # SPACE
0x0020 ; spacehackarabic ; 6 # Adobe Glyph List (Sept/02)
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-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -9,18 +9,18 @@
package PDF::API2::Version;
BEGIN {
use vars qw( $VERSION %CVersion );
- $VERSION = '0.46';
+ $VERSION = '0.49';
%CVersion = (
- 'vFredo' => 'PDF::API2 0.46 (stable-3328 / 2005-09-12)',
- 'vGNU' => 'PDF::API2 0.46 (2005-09-12 18:58:13)',
- 'vHex' => '0x0002ED00',
- 'vLong' => '0.46 (2005-09-12 18:58:13)',
- 'vPerl' => '0.46',
- 'vShort' => '0.46',
- 'vSquid' => '0.46-stable-3328',
- 'vTeX' => 'This is PDF::API2, Version 0.46 (2005-09-12 18:58:13)',
- 'vWeb' => 'PDF::API2/0.46',
- 'vWin' => '0.46 build 3328',
+ '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',
);
}
1;
@@ -36,16 +36,16 @@
=head1 VERSION
- vFredo: PDF::API2 0.46 (stable-3328 / 2005-09-12)
- vGNU: PDF::API2 0.46 (2005-09-12 18:58:13)
- vHex: 0x0002ED00
- vLong: 0.46 (2005-09-12 18:58:13)
- vPerl: 0.46
- vShort: 0.46
- vSquid: 0.46-stable-3328
- vTeX: This is PDF::API2, Version 0.46 (2005-09-12 18:58:13)
- vWeb: PDF::API2/0.46
- vWin: 0.46 build 3328
+ 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
=cut
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2.pm
===================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2.pm 2005-10-24 17:07:53 UTC (rev 1449)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2.pm 2005-10-24 17:11:49 UTC (rev 1450)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: API2.pm,v 1.83 2005/09/12 16:54:21 fredo Exp $
+# $Id: API2.pm,v 1.86 2005/10/21 19:51:05 fredo Exp $
#
#=======================================================================
@@ -37,7 +37,7 @@
use vars qw( $VERSION $seq @FontDirs );
- ($VERSION) = sprintf '%i.%03i', split(/\./,('$Revision: 1.83 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/09/12 16:54:21 $
+ ($VERSION) = sprintf '%i.%03i', split(/\./,('$Revision: 1.86 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/10/21 19:51:05 $
@FontDirs = ( (map { "$_/PDF/API2/fonts" } @INC),
qw[ /usr/share/fonts /usr/local/share/fonts c:/windows/fonts c:/winnt/fonts ] );
@@ -715,19 +715,23 @@
$pgs->{Resources}->realise;
};
}
- foreach $pgref ($pgs->{'Kids'}->elementsof) {
- $pg = $pdf->read_obj($pgref);
- if ($pg->{'Type'}->val =~ m/^Pages$/o) {
- push(@pglist, proc_pages($pdf, $pg));
- } else {
+ foreach $pg ($pgs->{'Kids'}->elementsof) {
+ $pg->realise;
+ if ($pg->{'Type'}->val =~ m/^Pages$/o)
+ {
+ my @morepages = proc_pages($pdf, $pg);
+ push(@pglist, @morepages);
+ }
+ else
+ {
$pdf->{' apipagecount'}++;
- $pgref->{' pnum'} = $pdf->{' apipagecount'};
+ $pg->{' pnum'} = $pdf->{' apipagecount'};
if(defined($pg->{Resources})) {
eval {
$pg->{Resources}->realise;
};
}
- push (@pglist, $pgref);
+ push (@pglist, $pg);
}
}
return(@pglist);
@@ -1516,6 +1520,8 @@
'-encode' ... changes the encoding of the font from its default.
+ '-dokern' ... enables kerning if data is available.
+
=cut
sub corefont {
@@ -1553,6 +1559,8 @@
windows printer font metrics file (PFM).
(this option overrides the -encode option)
+ '-dokern' ... enables kerning if data is available.
+
=cut
sub psfont {
@@ -1594,6 +1602,8 @@
'-isocmap' ... per default the MS Unicode Map is used, if this
option is given the ISO Unicode Map will be used.
+ '-dokern' ... enables kerning if data is available.
+
=cut
sub ttfont {
@@ -2404,6 +2414,15 @@
=head1 HISTORY
$Log: API2.pm,v $
+ Revision 1.86 2005/10/21 19:51:05 fredo
+ fixed proc_pages
+
+ Revision 1.85 2005/10/20 21:06:39 fredo
+ documented '-dokern' option for ttfonts
+
+ Revision 1.84 2005/10/19 21:23:26 fredo
+ documented '-dokern' option for core- and psfonts
+
Revision 1.83 2005/09/12 16:54:21 fredo
added -isocmap option
More information about the Pkg-perl-cvs-commits
mailing list