r21063 - in /trunk/libfont-ttf-perl: ./ debian/ lib/Font/ lib/Font/TTF/ lib/Font/TTF/Kern/ lib/Font/TTF/Mort/ t/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Jun 14 19:34:40 UTC 2008


Author: gregoa
Date: Sat Jun 14 19:34:40 2008
New Revision: 21063

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21063
Log:
New upstream release.

Added:
    trunk/libfont-ttf-perl/Changes
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/Changes
    trunk/libfont-ttf-perl/lib/Font/TTF/Dumper.pm
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/lib/Font/TTF/Dumper.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/GrFeat.pm
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/lib/Font/TTF/GrFeat.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/OTTags.pm
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/lib/Font/TTF/OTTags.pm
    trunk/libfont-ttf-perl/t/OFL.txt
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/t/OFL.txt
    trunk/libfont-ttf-perl/t/tags.t
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/t/tags.t
    trunk/libfont-ttf-perl/t/testfont.ttf
      - copied unchanged from r21061, branches/upstream/libfont-ttf-perl/current/t/testfont.ttf
Removed:
    trunk/libfont-ttf-perl/lib/Font/TTF/Tags.pm
Modified:
    trunk/libfont-ttf-perl/MANIFEST
    trunk/libfont-ttf-perl/META.yml
    trunk/libfont-ttf-perl/README.TXT
    trunk/libfont-ttf-perl/debian/changelog
    trunk/libfont-ttf-perl/lib/Font/TTF.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/AATKern.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Cmap.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Coverage.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Font.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Kern/ClassArray.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Kern/CompactClassArray.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Kern/OrderedList.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Kern/StateTable.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Kern/Subtable.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Chain.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Contextual.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Insertion.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Ligature.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Noncontextual.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Rearrangement.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Subtable.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/OS_2.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/PSNames.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Ttopen.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Useall.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/Utils.pm
    trunk/libfont-ttf-perl/lib/Font/TTF/XMLparse.pm

Modified: trunk/libfont-ttf-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/MANIFEST?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/MANIFEST (original)
+++ trunk/libfont-ttf-perl/MANIFEST Sat Jun 14 19:34:40 2008
@@ -1,3 +1,4 @@
+Changes
 COPYING
 lib/Font/TTF.pm
 lib/Font/TTF/AATKern.pm
@@ -9,6 +10,7 @@
 lib/Font/TTF/Coverage.pm
 lib/Font/TTF/Cvt_.pm
 lib/Font/TTF/Delta.pm
+lib/Font/TTF/Dumper.pm
 lib/Font/TTF/EBDT.pm
 lib/Font/TTF/EBLC.pm
 lib/Font/TTF/Fdsc.pm
@@ -20,6 +22,7 @@
 lib/Font/TTF/Glyf.pm
 lib/Font/TTF/Glyph.pm
 lib/Font/TTF/GPOS.pm
+lib/Font/TTF/GrFeat.pm
 lib/Font/TTF/GSUB.pm
 lib/Font/TTF/Hdmx.pm
 lib/Font/TTF/Head.pm
@@ -47,6 +50,7 @@
 lib/Font/TTF/OldCmap.pm
 lib/Font/TTF/OldMort.pm
 lib/Font/TTF/OS_2.pm
+lib/Font/TTF/OTTags.pm
 lib/Font/TTF/PCLT.pm
 lib/Font/TTF/Post.pm
 lib/Font/TTF/Prep.pm
@@ -54,7 +58,6 @@
 lib/Font/TTF/PSNames.pm
 lib/Font/TTF/Segarr.pm
 lib/Font/TTF/Table.pm
-lib/Font/TTF/Tags.pm
 lib/Font/TTF/Ttc.pm
 lib/Font/TTF/Ttopen.pm
 lib/Font/TTF/Useall.pm
@@ -70,6 +73,7 @@
 META.yml
 README.TXT
 t/OFL.txt
+t/tags.t
 t/testfont.ttf
 t/ttfcopy.t
 TODO

Modified: trunk/libfont-ttf-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/META.yml?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/META.yml (original)
+++ trunk/libfont-ttf-perl/META.yml Sat Jun 14 19:34:40 2008
@@ -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:         Font-TTF
-version:      0.43
+version:      0.45
 version_from: lib/Font/TTF.pm
 installdirs:  site
 requires:

Modified: trunk/libfont-ttf-perl/README.TXT
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/README.TXT?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/README.TXT (original)
+++ trunk/libfont-ttf-perl/README.TXT Sat Jun 14 19:34:40 2008
@@ -1,21 +1,4 @@
         Perl Module: Font::TTF
-
-Announcing:
-
-The addition of many new tables including support for the OpenType
-tables: GSUB, GDEF and GPOS and also a bunch of AAT tables. The module
-now also supports XML output and a buggy XML input. All of these new
-features should be considered as Alpha code and particularly the XML
-language is liable to change for some of the more complex table types.
-
-After a long wait, Name tables now try to return UTF8 strings where
-possible. The deprecation period has now passed and by default the
-Name.pm returns strings as utf8 where possible. See Name.pm for details.
-To get old behaviour, set C<$Font::TTF::Name::utf8> to 0.
-
-Solution to the installation problem for users on Win32, without make.
-Use pmake instead. Wherever you see the command: make, in this document,
-type: pmake instead.
 
 =head1 Introduction
 
@@ -28,44 +11,12 @@
 In short, you can do almost anything with a standard TrueType font with
 this module. Be Brave!
 
-The module also includes various useful utilities:
-
-check_attach    Checks an attachment point database against a font. See
-                ttfbuilder for details
-eurofix         Fixes fonts created for Win95 so that they work in Win98 and NT4
-                sp4, Win2K and so on.
-hackos2         This old favourite lets you do unspeakable things to your OS/2
-                table, including sorting Unicode range bits and codepage bits
-                (Perl 4)
-psfix           Tidy up the postscript names in a font to be Postscript
-                conformant
-ttfbuilder      Build fonts from other fonts, including ligature building, etc.
-                Has excellent explanatory POD
-ttfname         Renames a font and allows access to name strings. This needs
-                a rewrite (Perl 4)
-ttfremap        Simpler font subsetter than ttfbuilder
-
-
-Also included are the following example scripts. To use these you will need to
-install them manually from the examples directory included in the distribution.
-
-StripCmap       Strips a specified cmap from the given font
-addpclt         Makes up values and adds a PCLT table to a font
-makemono        Makes a font mono spaced (Perl 4)
-symbol.rmp      Example remap file for ttfremap
-ttfdeltable     Deletes a specified table from a font
-ttfenc          Create .enc, .afm, .tfm and .map entry for a ttf file based on
-                Unicode rather than postscript. Requires afm2tfm and ttf2afm.
-ttfwidth        Create a table of interesting information regarding widths of
-                characters. FRET is a much better tool for this now (Perl 4)
-xmldump         Dumps a font as XML. The XML needs some work for some of the
-                more complex tables
-zerohyph        Create a zero width hyphen in place of the normal hyphen
-
 Any suggestions, improvements, additions, subclasses, etc. would be gratefully
 received and probably included in a future release. Please send them to me.
 
 This module has been tested on Win32, Unix and Mac.
+
+Applications that were associated with this module have been moved to Font::TTF::Scripts where great things can be done.
 
 =head1 SYNOPSIS
 
@@ -87,18 +38,6 @@
 
     $f->out($ARGV[1]);
     $f->DESTROY;               # forces close of $in and maybe memory reclaim!
-
-=head1 PERL4 Utilities
-
-As an aside, the following Perl4 system and utilities have been slung in:
-
-perlmod.pl      This is the Perl4 library for these programs
-
-addpclt         Create a PCLT table for a font with lots of junk in it
-Hackos2         Do all sorts of unspeakable things to the OS/2 table
-MakeMono        Force a font to be mono-spaced
-Ttfname         Rename a font (and set any other name strings)
-TTFWIDTH        Find the centre of every glyph in a font and print report
 
 =head1 Installation
 
@@ -144,9 +83,6 @@
 =head2 Future Changes
 
 I do not anticipate any more restructuring changes (but reserve the right to do so).
-One area I am waiting to change is that of the Name table where I would like to 
-pass strings using UTF-8. When the UTF-8 version of Perl is ported to Win32 then I
-can start the changes and cross-mappings (for the Mac).
 
 =head1 AUTHOR
 

Modified: trunk/libfont-ttf-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/debian/changelog?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/debian/changelog (original)
+++ trunk/libfont-ttf-perl/debian/changelog Sat Jun 14 19:34:40 2008
@@ -1,3 +1,9 @@
+libfont-ttf-perl (0.45-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Sat, 14 Jun 2008 21:32:29 +0200
+
 libfont-ttf-perl (0.43-1) unstable; urgency=low
 
   [ Martín Ferrari ]

Modified: trunk/libfont-ttf-perl/lib/Font/TTF.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF.pm Sat Jun 14 19:34:40 2008
@@ -1,6 +1,8 @@
 package Font::TTF;
 
-$VERSION = '0.43';    # MJPH    20-NOV-2007      Add a test!
+$VERSION = '0.45';    # MJPH    11-JUN-2008      Packaging tidying
+# $VERSION = '0.44';    # MJPH     9-JUN-2008      Various bug fixes
+# $VERSION = '0.43';    # MJPH    20-NOV-2007      Add a test!
 # $VERSION = '0.42';    # MJPH    11-OCT-2007      Add Volt2ttf support
 # $VERSION = '0.41';    # MJPH    27-MAR-2007      Remove warnings from font copy
 #                                                  Bug fixes in Ttopen, GDEF

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/AATKern.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/AATKern.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/AATKern.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/AATKern.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::AATKern
+Font::TTF::AATKern - AAT Kern table
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Cmap.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Cmap.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Cmap.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Cmap.pm Sat Jun 14 19:34:40 2008
@@ -553,7 +553,7 @@
 =item array
 
 Returns each element of reverse as an array since a glyph may be mapped by more
-than one Unicode value. The arrays are unsorted.
+than one Unicode value. The arrays are unsorted. Otherwise store any one unicode value for a glyph.
 
 =back
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Coverage.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Coverage.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Coverage.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Coverage.pm Sat Jun 14 19:34:40 2008
@@ -93,13 +93,14 @@
                 map {$self->{'val'}{$_} = $c++} ($first .. $last);
             }
         }
+        $self->{'count'} = $num;
     } elsif ($fmt == 1)
     {
         $fh->read($dat, 2);
         $first = $num;
         ($num) = unpack("n", $dat);
         $fh->read($dat, $num << 1);
-        map {$self->{'val'}{$first++} = $_} unpack("n*", $dat);
+        map {$self->{'val'}{$first++} = $_; $self->{'max'} = $_ if ($_ > $self->{'max'})} unpack("n*", $dat);
     } elsif ($fmt == 2)
     {
         $fh->read($dat, $num * 6);
@@ -107,6 +108,7 @@
         {
             ($first, $last, $c) = unpack("n3", substr($dat, $i * 6, 6));
             map {$self->{'val'}{$_} = $c} ($first .. $last);
+            $self->{'max'} = $c if ($c > $self->{'max'});
         }
     }
     $self;

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Font.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Font.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Font.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Font.pm Sat Jun 14 19:34:40 2008
@@ -40,6 +40,7 @@
     table       Font::TTF::Table      - for unknown tables
     EBDT        Font::TTF::EBDT
     EBLC        Font::TTF::EBLC
+    Feat        Font::TTF::GrFeat
     GDEF        Font::TTF::GDEF
     GPOS        Font::TTF::GPOS
     GSUB        Font::TTF::GSUB
@@ -72,7 +73,7 @@
 Links are:
 
 L<Font::TTF::Table> 
-L<Font::TTF::EBDT> L<Font::TTF::EBLC>
+L<Font::TTF::EBDT> L<Font::TTF::EBLC> L<Font::TTF::GrFeat>
 L<Font::TTF::GDEF> L<Font::TTF::GPOS> L<Font::TTF::GSUB> L<Font::TTF::LTSH>
 L<Font::TTF::OS_2> L<Font::TTF::PCLT> L<Font::TTF::Bsln> L<Font::TTF::Cmap> L<Font::TTF::Cvt_>
 L<Font::TTF::Fdsc> L<Font::TTF::Feat> L<Font::TTF::Fmtx> L<Font::TTF::Fpgm> L<Font::TTF::Glyf>
@@ -94,6 +95,10 @@
 This is used during output to disable the creation of the file checksum in the
 head table. For example, during DSIG table creation, this flag will be set to
 ensure that the file checksum is left at zero.
+
+=item noharmony
+
+If set, do not harmonize the script and lang trees of GPOS and GSUB tables. See L<Font::TTF::Ttopen> for more info.
 
 =item fname (R)
 
@@ -168,6 +173,7 @@
         'table' => 'Font::TTF::Table',
         'EBDT' => 'Font::TTF::EBDT',
         'EBLC' => 'Font::TTF::EBLC',
+        'Feat' => 'Font::TTF::GrFeat',
         'GDEF' => 'Font::TTF::GDEF',
         'GPOS' => 'Font::TTF::GPOS',
         'GSUB' => 'Font::TTF::GSUB',

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Kern/ClassArray.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Kern/ClassArray.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Kern/ClassArray.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Kern/ClassArray.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Kern::ClassArray
+Font::TTF::Kern::ClassArray - ClassArray Kern Subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Kern/CompactClassArray.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Kern/CompactClassArray.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Kern/CompactClassArray.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Kern/CompactClassArray.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Kern::CompactClassArray
+Font::TTF::Kern::CompactClassArray - Compact Class Array kern subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Kern/OrderedList.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Kern/OrderedList.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Kern/OrderedList.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Kern/OrderedList.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Kern::OrderedList
+Font::TTF::Kern::OrderedList - Ordered List Kern subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Kern/StateTable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Kern/StateTable.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Kern/StateTable.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Kern/StateTable.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Kern::StateTable
+Font::TTF::Kern::StateTable - State Table Kern subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Kern/Subtable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Kern/Subtable.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Kern/Subtable.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Kern/Subtable.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Kern::Subtable
+Font::TTF::Kern::Subtable - Kern Subtable superclass for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Chain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Chain.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Chain.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Chain.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Chain
+Font::TTF::Mort::Chain - Chain Mort subtable for AAT
 
 =cut
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Contextual.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Contextual.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Contextual.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Contextual.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Contextual
+Font::TTF::Mort::Contextual - Contextual Mort subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Insertion.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Insertion.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Insertion.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Insertion.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Insertion
+Font::TTF::Mort::Insertion - Insertion Mort subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Ligature.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Ligature.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Ligature.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Ligature.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Ligature
+Font::TTF::Mort::Ligature - Ligature Mort subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Noncontextual.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Noncontextual.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Noncontextual.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Noncontextual.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Noncontextual
+Font::TTF::Mort::Noncontextual - Noncontextual Mort subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Rearrangement.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Rearrangement.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Rearrangement.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Rearrangement.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Rearrangement
+Font::TTF::Mort::Rearrangement - Rearrangement Mort subtable for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Subtable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Subtable.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Subtable.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Mort/Subtable.pm Sat Jun 14 19:34:40 2008
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-Font::TTF::Mort::Subtable
+Font::TTF::Mort::Subtable - Mort subtable superclass for AAT
 
 =head1 METHODS
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/OS_2.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/OS_2.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/OS_2.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/OS_2.pm Sat Jun 14 19:34:40 2008
@@ -327,6 +327,16 @@
     $self->{'Version'} = 1 if (defined $self->{'ulCodePageRange1'} && $self->{'Version'} < 1);
     $self->{'Version'} = 2 if (defined $self->{'maxLookups'} && $self->{'Version'} < 2);
     
+    if ((exists $self->{' PARENT'}{'GPOS'} && $self->{' PARENT'}{'GPOS'}{' read'}) ||
+        (exists $self->{' PARENT'}{'GSUB'} && $self->{' PARENT'}{'GSUB'}{' read'}))
+    {
+        # one or both of GPOS & GSUB exist and have been read or modified; so update usMaxContexts
+        my ($lp, $ls);
+        $lp = $self->{' PARENT'}{'GPOS'}->maxContext if exists $self->{' PARENT'}{'GPOS'};
+        $ls = $self->{' PARENT'}{'GSUB'}->maxContext if exists $self->{' PARENT'}{'GSUB'};
+        $self->{'maxLookups'} = $lp > $ls ? $lp : $ls;
+    }
+    
     $self;
 }
 

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/PSNames.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/PSNames.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/PSNames.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/PSNames.pm Sat Jun 14 19:34:40 2008
@@ -15,8 +15,9 @@
 =cut
 
 use strict;
-use vars qw(%names %agl @EXPORT_OK);
-use Exporter qw( import );
+use vars qw(%names %agl @EXPORT_OK @ISA);
+require Exporter;
+ at ISA = qw( Exporter );
 @EXPORT_OK = qw( parse lookup);
 
 # Adobe Glyph List for New Fonts	
@@ -1775,7 +1776,8 @@
 	'cieuckorean' => "\x{3148}",
 	'cieucparenkorean' => "\x{3208}",
 	'cieucuparenkorean' => "\x{321C}",
-	'circleot' => "\x{2299}",
+	'circleot' => "\x{2299}",           # Actual Adobe glyph list entry -- identified as typo, May 2008
+	'circledot' => "\x{2299}",          # What it should have been
 	'circlepostalmark' => "\x{3036}",
 	'circlewithlefthalfblack' => "\x{25D0}",
 	'circlewithrighthalfblack' => "\x{25D1}",

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Ttopen.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Ttopen.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Ttopen.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Ttopen.pm Sat Jun 14 19:34:40 2008
@@ -667,6 +667,115 @@
 sub out_sub
 { }
 
+=head2 $t->dirty
+
+Setting GPOS or GSUB dirty means that OS/2 may need updating, so set it dirty.
+
+=cut
+
+sub dirty
+{
+    my ($self, $val) = @_;
+    my $res = $self->SUPER::dirty ($val);
+    $self->{' PARENT'}{'OS/2'}->read->dirty($val) if exists $self->{' PARENT'}{'OS/2'};
+    $res;
+}
+
+=head2 $t->maxContext
+
+Returns the length of the longest opentype rule in this table.
+
+=cut
+
+sub maxContext
+{
+    my ($self) = @_;
+    
+    # Make sure table is read
+    $self->read;
+
+    # Calculate my contribution to OS/2 usMaxContext
+    
+    my ($maxcontext, $l, $s, $r, $m);
+   
+    for $l (@{$self->{'LOOKUP'}})        # Examine each lookup
+    {
+        for $s (@{$l->{'SUB'}})         # Multiple possible subtables for this lookup
+        {
+            for $r (@{$s->{'RULES'}})   # One ruleset for each covered glyph
+            {
+                for $m (@{$r})          # Multiple possible matches for this covered glyph 
+                {
+                    my $lgt;
+                    $lgt++ if exists $s->{'COVERAGE'};  # Count 1 for the coverage table if it exists
+                    for (qw(MATCH PRE POST))
+                    {
+                        $lgt += @{$m->{$_}} if exists $m->{$_};
+                    }
+                    $maxcontext = $lgt if $lgt > $maxcontext;
+                }
+            }
+            
+        }
+    }
+    
+    $maxcontext;    
+}    
+
+
+=head2 $t->update
+
+Unless $t->{' PARENT'}{' noharmony'} is true, update will make sure that GPOS and GSUB include 
+the same scripts and languages. Any added scripts and languages will have empty feature sets.
+
+=cut
+
+# Assumes we are called on both GSUB and GPOS. So simply ADDS scripts and languages to $self that it finds
+# in the other table.
+
+sub update
+{
+    my ($self) = @_;
+    
+    return undef unless ($self->SUPER::update);
+
+    # Enforce script/lang congruence unless asked not to:
+    return $self if $self->{' PARENT'}{' noharmony'};
+
+    # Find my sibling (GSUB or GPOS, depending on which I am)
+    my $sibling = ref($self) eq 'Font::TTF::GSUB' ? 'GPOS' : ref($self) eq 'Font::TTF::GPOS' ? 'GSUB' : undef;
+    return $self unless $sibling && exists $self->{' PARENT'}{$sibling};
+    $sibling = $self->{' PARENT'}{$sibling};
+    next unless defined $sibling;
+    
+    # Look through scripts defined in sibling:
+    for my $sTag (grep {length($_) == 4} keys %{$sibling->{'SCRIPTS'}})
+    {
+        my $sibScript = $sibling->{'SCRIPTS'}{$sTag};
+        $sibScript = $sibling->{$sibScript->{' REFTAG'}} if exists $sibScript->{' REFTAG'} && $sibScript->{' REFTAG'} ne '';
+        
+        $self->{'SCRIPTS'}{$sTag} = {} unless defined $self->{'SCRIPTS'}{$sTag}; # Create script if not present in $self
+        
+        my $myScript = $self->{'SCRIPTS'}{$sTag};
+        $myScript = $self->{$myScript->{' REFTAG'}} if exists $myScript->{' REFTAG'} && $myScript->{' REFTAG'} ne '';
+                
+        foreach my $lTag (@{$sibScript->{'LANG_TAGS'}})
+        {
+            # Ok, found a script/lang that is in our sibling.
+            next if exists $myScript->{$lTag};  # Already in $self
+            
+            # Need to create this lang:
+            push @{$myScript->{'LANG_TAGS'}}, $lTag;
+            $myScript->{$lTag} = { 'FEATURES' => [] };
+        }
+        unless (defined $myScript->{'DEFAULT'})
+        {
+            # Create default lang for this script. Link to 'dflt' if it exists
+            $myScript->{'DEFAULT'} = exists $myScript->{'dflt'} ? {' REFTAG' => 'dflt'} : { 'FEATURES' => [] };
+        }
+    }
+    $self;
+}
 
 =head1 Internal Functions & Methods
 
@@ -734,8 +843,9 @@
     my ($obj, $cache, $offset) = @_;
 
     return 0 unless defined $obj;
-    $cache->{"$obj"}[0] = $obj unless defined $cache->{"$obj"};
-    push (@{$cache->{"$obj"}[1]}, $offset);
+    unless (defined $cache->{"$obj"})
+    { push (@{$cache->{''}}, $obj); }
+    push (@{$cache->{"$obj"}}, $offset);
     return 0;
 }
 
@@ -766,12 +876,12 @@
     foreach $r (@$cache_list)
     {
         $offs = $r->[1];
-        foreach $t (sort keys %{$r->[0]})
+        foreach $t (@{$r->[0]{''}})
         {
             $str = "$t";
             if (!defined $master_cache->{$str})
             {
-                my ($vec) = $r->[0]{$str}[0]->signature();
+                my ($vec) = $t->signature();
                 if ($vecs{$vec})
                 { $master_cache->{$str} = $master_cache->{$vecs{$vec}}; }
                 else
@@ -780,12 +890,12 @@
                     $master_cache->{$str} = ($state ? length($out) : $fh->tell())
                                                                        - $base_loc;
                     if ($state)
-                    { $out .= $r->[0]{$str}[0]->out($fh, 1); }
+                    { $out .= $t->out($fh, 1); }
                     else
-                    { $r->[0]{$str}[0]->out($fh, 0); }
+                    { $t->out($fh, 0); }
                 }
             }
-            foreach $s (@{$r->[0]{$str}[1]})
+            foreach $s (@{$r->[0]{$str}})
             { substr($out, $s, 2) = pack('n', $master_cache->{$str} - $offs); }
         }
     }

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Useall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Useall.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Useall.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Useall.pm Sat Jun 14 19:34:40 2008
@@ -18,6 +18,7 @@
 use Font::TTF::Delta;
 use Font::TTF::Fdsc;
 use Font::TTF::Feat;
+use Font::TTF::GrFeat;
 use Font::TTF::Fmtx;
 use Font::TTF::GPOS;
 use Font::TTF::Mort;

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/Utils.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/Utils.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/Utils.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/Utils.pm Sat Jun 14 19:34:40 2008
@@ -291,7 +291,7 @@
     my ($res, $i);
     my (@dat) = unpack("n*", $str);
 
-    return pack("U*", @dat) if ($^V && $^V ge v5.6.0);
+    return pack("U*", @dat) if ($] >= 5.006);
     for ($i = 0; $i <= $#dat; $i++)
     {
         my ($dat) = $dat[$i];

Modified: trunk/libfont-ttf-perl/lib/Font/TTF/XMLparse.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfont-ttf-perl/lib/Font/TTF/XMLparse.pm?rev=21063&op=diff
==============================================================================
--- trunk/libfont-ttf-perl/lib/Font/TTF/XMLparse.pm (original)
+++ trunk/libfont-ttf-perl/lib/Font/TTF/XMLparse.pm Sat Jun 14 19:34:40 2008
@@ -105,7 +105,7 @@
 =cut
 
 use XML::Parser::Expat;
-use Exporter;
+require Exporter;
 
 use strict;
 use vars qw(@ISA @EXPORT);




More information about the Pkg-perl-cvs-commits mailing list