xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spepp...@apache.org
Subject svn commit: r1078249 [3/10] - in /xmlgraphics/fop/branches/Temp_ComplexScripts: ./ src/codegen/complexscripts/ src/codegen/complexscripts/arab/ src/codegen/complexscripts/arab/ttx/ src/codegen/java/org/apache/fop/tools/ src/codegen/unicode/java/org/apa...
Date Sat, 05 Mar 2011 09:07:17 GMT
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningTable.java?rev=1078249&r1=1078248&r2=1078249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningTable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningTable.java Sat Mar  5 09:06:59 2011
@@ -72,14 +72,14 @@ public class GlyphPositioningTable exten
     public GlyphPositioningTable ( GlyphDefinitionTable gdef, Map lookups, List subtables ) {
         super ( gdef, lookups );
         if ( ( subtables == null ) || ( subtables.size() == 0 ) ) {
-            throw new IllegalArgumentException ( "subtables must be non-empty" );
+            throw new AdvancedTypographicTableFormatException ( "subtables must be non-empty" );
         } else {
             for ( Iterator it = subtables.iterator(); it.hasNext();) {
                 Object o = it.next();
                 if ( o instanceof GlyphPositioningSubtable ) {
                     addSubtable ( (GlyphSubtable) o );
                 } else {
-                    throw new IllegalArgumentException ( "subtable must be a glyph positioning subtable" );
+                    throw new AdvancedTypographicTableFormatException ( "subtable must be a glyph positioning subtable" );
                 }
             }
             freezeSubtables();
@@ -313,14 +313,14 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( ( entries == null ) || ( entries.size() != 1 ) ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null and contain exactly one entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null and contain exactly one entry" );
             } else {
                 Value v;
                 Object o = entries.get(0);
                 if ( o instanceof Value ) {
                     v = (Value) o;
                 } else {
-                    throw new IllegalArgumentException ( "illegal entries entry, must be Value, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries entry, must be Value, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 }
                 assert this.value == null;
                 this.value = v;
@@ -357,17 +357,17 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof Value[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, single entry must be a Value[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, single entry must be a Value[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     Value[] va = (Value[]) o;
                     if ( va.length != getCoverageSize() ) {
-                        throw new IllegalArgumentException ( "illegal values array, " + entries.size() + " values present, but requires " + getCoverageSize() + " values" );
+                        throw new AdvancedTypographicTableFormatException ( "illegal values array, " + entries.size() + " values present, but requires " + getCoverageSize() + " values" );
                     } else {
                         assert this.values == null;
                         this.values = va;
@@ -478,13 +478,13 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof PairValues[][] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first (and only) entry must be a PairValues[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first (and only) entry must be a PairValues[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     pvm = (PairValues[][]) o;
                 }
@@ -520,11 +520,11 @@ public class GlyphPositioningTable exten
         public PairValues getPairValues ( int ci, int gi1, int gi2 ) {
             if ( pvm != null ) {
                 int c1 = cdt1.getClassIndex ( gi1, 0 );
-                if ( ( c1 < nc1 ) && ( c1 < pvm.length ) ) {
+                if ( ( c1 >= 0 ) && ( c1 < nc1 ) && ( c1 < pvm.length ) ) {
                     PairValues[] pvt = pvm [ c1 ];
                     if ( pvt != null ) {
                         int c2 = cdt2.getClassIndex ( gi2, 0 );
-                        if ( ( c2 < nc2 ) && ( c2 < pvt.length ) ) {
+                        if ( ( c2 >= 0 ) && ( c2 < nc2 ) && ( c2 < pvt.length ) ) {
                             return pvt [ c2 ];
                         }
                     }
@@ -534,33 +534,33 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 5 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     cdt1 = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) == null ) || ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     cdt2 = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(2) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     nc1 = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(3) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fourth entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fourth entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     nc2 = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(4) ) == null ) || ! ( o instanceof PairValues[][] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fifth entry must be a PairValues[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fifth entry must be a PairValues[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     pvm = (PairValues[][]) o;
                 }
@@ -668,15 +668,15 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof Anchor[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first (and only) entry must be a Anchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first (and only) entry must be a Anchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else if ( ( ( (Anchor[]) o ) . length % 2 ) != 0 ) {
-                    throw new IllegalArgumentException ( "illegal entries, Anchor[] array must have an even number of entries, but has: " + ( (Anchor[]) o ) . length );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, Anchor[] array must have an even number of entries, but has: " + ( (Anchor[]) o ) . length );
                 } else {
                     aa = (Anchor[]) o;
                 }
@@ -798,28 +798,28 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 4 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 4 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 4 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphCoverageTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphCoverageTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphCoverageTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     bct = (GlyphCoverageTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     nmc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(2) ) == null ) || ! ( o instanceof MarkAnchor[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be a MarkAnchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be a MarkAnchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     maa = (MarkAnchor[]) o;
                 }
                 if ( ( ( o = entries.get(3) ) == null ) || ! ( o instanceof Anchor[][] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fourth entry must be a Anchor[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fourth entry must be a Anchor[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     bam = (Anchor[][]) o;
                 }
@@ -951,33 +951,33 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 5 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphCoverageTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphCoverageTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphCoverageTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     lct = (GlyphCoverageTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     nmc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(2) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     mxc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(3) ) == null ) || ! ( o instanceof MarkAnchor[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fourth entry must be a MarkAnchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fourth entry must be a MarkAnchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     maa = (MarkAnchor[]) o;
                 }
                 if ( ( ( o = entries.get(4) ) == null ) || ! ( o instanceof Anchor[][][] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fifth entry must be a Anchor[][][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fifth entry must be a Anchor[][][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     lam = (Anchor[][][]) o;
                 }
@@ -1086,28 +1086,28 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 4 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 4 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 4 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphCoverageTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphCoverageTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphCoverageTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     mct2 = (GlyphCoverageTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     nmc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(2) ) == null ) || ! ( o instanceof MarkAnchor[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be a MarkAnchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be a MarkAnchor[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     maa = (MarkAnchor[]) o;
                 }
                 if ( ( ( o = entries.get(3) ) == null ) || ! ( o instanceof Anchor[][] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fourth entry must be a Anchor[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fourth entry must be a Anchor[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     mam = (Anchor[][]) o;
                 }
@@ -1234,13 +1234,13 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -1327,27 +1327,27 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 3 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 3 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 3 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     cdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     ngc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(2) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                     if ( rsa.length != ngc ) {
-                        throw new IllegalArgumentException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
+                        throw new AdvancedTypographicTableFormatException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
                     }
                 }
             }
@@ -1427,13 +1427,13 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -1546,13 +1546,13 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -1622,37 +1622,37 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 5 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     icdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) != null ) && ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass() );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass() );
                 } else {
                     bcdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(2) ) != null ) && ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass() );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass() );
                 } else {
                     lcdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(3) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fourth entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fourth entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     ngc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(4) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fifth entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fifth entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                     if ( rsa.length != ngc ) {
-                        throw new IllegalArgumentException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
+                        throw new AdvancedTypographicTableFormatException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
                     }
                 }
             }
@@ -1713,13 +1713,13 @@ public class GlyphPositioningTable exten
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java?rev=1078249&r1=1078248&r2=1078249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java Sat Mar  5 09:06:59 2011
@@ -70,14 +70,14 @@ public class GlyphSubstitutionTable exte
     public GlyphSubstitutionTable ( GlyphDefinitionTable gdef, Map lookups, List subtables ) {
         super ( gdef, lookups );
         if ( ( subtables == null ) || ( subtables.size() == 0 ) ) {
-            throw new IllegalArgumentException ( "subtables must be non-empty" );
+            throw new AdvancedTypographicTableFormatException ( "subtables must be non-empty" );
         } else {
             for ( Iterator it = subtables.iterator(); it.hasNext();) {
                 Object o = it.next();
                 if ( o instanceof GlyphSubstitutionSubtable ) {
                     addSubtable ( (GlyphSubtable) o );
                 } else {
-                    throw new IllegalArgumentException ( "subtable must be a glyph substitution subtable" );
+                    throw new AdvancedTypographicTableFormatException ( "subtable must be a glyph substitution subtable" );
                 }
             }
             freezeSubtables();
@@ -297,14 +297,14 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( ( entries == null ) || ( entries.size() != 1 ) ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null and contain exactly one entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null and contain exactly one entry" );
             } else {
                 Object o = entries.get(0);
                 int delta = 0;
                 if ( o instanceof Integer ) {
                     delta = ( (Integer) o ) . intValue();
                 } else {
-                    throw new IllegalArgumentException ( "illegal entries entry, must be Integer, but is: " + o );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries entry, must be Integer, but is: " + o );
                 }
                 this.delta = delta;
                 this.ciMax = getCoverageSize() - 1;
@@ -346,10 +346,10 @@ public class GlyphSubstitutionTable exte
                     if ( ( gid >= 0 ) && ( gid < 65536 ) ) {
                         glyphs [ i++ ] = gid;
                     } else {
-                        throw new IllegalArgumentException ( "illegal glyph index: " + gid );
+                        throw new AdvancedTypographicTableFormatException ( "illegal glyph index: " + gid );
                     }
                 } else {
-                    throw new IllegalArgumentException ( "illegal entries entry, must be Integer: " + o );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries entry, must be Integer: " + o );
                 }
             }
             assert i == n;
@@ -429,13 +429,13 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof int[][] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an int[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an int[][], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     gsa = (int[][]) o;
                 }
@@ -526,7 +526,7 @@ public class GlyphSubstitutionTable exte
                 if ( o instanceof int[] ) {
                     gaa [ i++ ] = (int[]) o;
                 } else {
-                    throw new IllegalArgumentException ( "illegal entries entry, must be int[]: " + o );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries entry, must be int[]: " + o );
                 }
             }
             assert i == n;
@@ -656,7 +656,7 @@ public class GlyphSubstitutionTable exte
                 if ( o instanceof LigatureSet ) {
                     ligatureSets [ i++ ] = (LigatureSet) o;
                 } else {
-                    throw new IllegalArgumentException ( "illegal ligatures entry, must be LigatureSet: " + o );
+                    throw new AdvancedTypographicTableFormatException ( "illegal ligatures entry, must be LigatureSet: " + o );
                 }
             }
             assert i == n;
@@ -784,13 +784,13 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -877,27 +877,27 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 3 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 3 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 3 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     cdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     ngc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(2) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                     if ( rsa.length != ngc ) {
-                        throw new IllegalArgumentException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
+                        throw new AdvancedTypographicTableFormatException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
                     }
                 }
             }
@@ -977,13 +977,13 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -1095,13 +1095,13 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -1171,37 +1171,37 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 5 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 5 entries" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an GlyphClassTable, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     icdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(1) ) != null ) && ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass() );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass() );
                 } else {
                     bcdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(2) ) != null ) && ! ( o instanceof GlyphClassTable ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass() );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass() );
                 } else {
                     lcdt = (GlyphClassTable) o;
                 }
                 if ( ( ( o = entries.get(3) ) == null ) || ! ( o instanceof Integer ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fourth entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fourth entry must be an Integer, but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     ngc = ((Integer)(o)).intValue();
                 }
                 if ( ( ( o = entries.get(4) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, fifth entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, fifth entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                     if ( rsa.length != ngc ) {
-                        throw new IllegalArgumentException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
+                        throw new AdvancedTypographicTableFormatException ( "illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes" );
                     }
                 }
             }
@@ -1262,13 +1262,13 @@ public class GlyphSubstitutionTable exte
         }
         private void populate ( List entries ) {
             if ( entries == null ) {
-                throw new IllegalArgumentException ( "illegal entries, must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, must be non-null" );
             } else if ( entries.size() != 1 ) {
-                throw new IllegalArgumentException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
+                throw new AdvancedTypographicTableFormatException ( "illegal entries, " + entries.size() + " entries present, but requires 1 entry" );
             } else {
                 Object o;
                 if ( ( ( o = entries.get(0) ) == null ) || ! ( o instanceof RuleSet[] ) ) {
-                    throw new IllegalArgumentException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
+                    throw new AdvancedTypographicTableFormatException ( "illegal entries, first entry must be an RuleSet[], but is: " + ( ( o != null ) ? o.getClass() : null ) );
                 } else {
                     rsa = (RuleSet[]) o;
                 }
@@ -1332,14 +1332,14 @@ public class GlyphSubstitutionTable exte
          */
         public Ligature ( int ligature, int[] components ) {
             if ( ( ligature < 0 ) || ( ligature > 65535 ) ) {
-                throw new IllegalArgumentException ( "invalid ligature glyph index: " + ligature );
+                throw new AdvancedTypographicTableFormatException ( "invalid ligature glyph index: " + ligature );
             } else if ( ( components == null ) || ( components.length == 0 ) ) {
-                throw new IllegalArgumentException ( "invalid ligature components, must be non-empty array" );
+                throw new AdvancedTypographicTableFormatException ( "invalid ligature components, must be non-empty array" );
             } else {
                 for ( int i = 0, n = components.length; i < n; i++ ) {
                     int gc = components [ i ];
                     if ( ( gc < 0 ) || ( gc > 65535 ) ) {
-                        throw new IllegalArgumentException ( "invalid component glyph index: " + gc );
+                        throw new AdvancedTypographicTableFormatException ( "invalid component glyph index: " + gc );
                     }
                 }
                 this.ligature = ligature;
@@ -1420,7 +1420,7 @@ public class GlyphSubstitutionTable exte
          */
         public LigatureSet ( Ligature[] ligatures ) {
             if ( ( ligatures == null ) || ( ligatures.length == 0 ) ) {
-                throw new IllegalArgumentException ( "invalid ligatures, must be non-empty array" );
+                throw new AdvancedTypographicTableFormatException ( "invalid ligatures, must be non-empty array" );
             } else {
                 this.ligatures = ligatures;
                 int ncMax = -1;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubtable.java?rev=1078249&r1=1078248&r2=1078249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubtable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubtable.java Sat Mar  5 09:06:59 2011
@@ -75,9 +75,9 @@ public abstract class GlyphSubtable impl
     protected GlyphSubtable ( String lookupId, int sequence, int flags, int format, GlyphMappingTable mapping )
     {
         if ( ( lookupId == null ) || ( lookupId.length() == 0 ) ) {
-            throw new IllegalArgumentException ( "invalid lookup identifier, must be non-empty string" );
+            throw new AdvancedTypographicTableFormatException ( "invalid lookup identifier, must be non-empty string" );
         } else if ( mapping == null ) {
-            throw new IllegalArgumentException ( "invalid mapping table, must not be null" );
+            throw new AdvancedTypographicTableFormatException ( "invalid mapping table, must not be null" );
         } else {
             this.lookupId = lookupId;
             this.sequence = sequence;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java?rev=1078249&r1=1078248&r2=1078249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java Sat Mar  5 09:06:59 2011
@@ -80,9 +80,9 @@ public class GlyphTable {
      */
     public GlyphTable ( GlyphTable gdef, Map/*<LookupSpec,List<String>>*/ lookups ) {
         if ( ( gdef != null ) && ! ( gdef instanceof GlyphDefinitionTable ) ) {
-            throw new IllegalArgumentException ( "bad glyph definition table" );
+            throw new AdvancedTypographicTableFormatException ( "bad glyph definition table" );
         } else if ( lookups == null ) {
-            throw new IllegalArgumentException ( "lookups must be non-null map" );
+            throw new AdvancedTypographicTableFormatException ( "lookups must be non-null map" );
         } else {
             this.gdef = gdef;
             this.lookups = lookups;
@@ -325,17 +325,17 @@ public class GlyphTable {
          */
         public LookupSpec ( String script, String language, String feature ) {
             if ( ( script == null ) || ( script.length() == 0 ) ) {
-                throw new IllegalArgumentException ( "script must be non-empty string" );
+                throw new AdvancedTypographicTableFormatException ( "script must be non-empty string" );
             } else if ( ( language == null ) || ( language.length() == 0 ) ) {
-                throw new IllegalArgumentException ( "language must be non-empty string" );
+                throw new AdvancedTypographicTableFormatException ( "language must be non-empty string" );
             } else if ( ( feature == null ) || ( feature.length() == 0 ) ) {
-                throw new IllegalArgumentException ( "feature must be non-empty string" );
+                throw new AdvancedTypographicTableFormatException ( "feature must be non-empty string" );
             } else if ( script.equals("*") ) {
-                throw new IllegalArgumentException ( "script must not be wildcard" );
+                throw new AdvancedTypographicTableFormatException ( "script must not be wildcard" );
             } else if ( language.equals("*") ) {
-                throw new IllegalArgumentException ( "language must not be wildcard" );
+                throw new AdvancedTypographicTableFormatException ( "language must not be wildcard" );
             } else if ( feature.equals("*") ) {
-                throw new IllegalArgumentException ( "feature must not be wildcard" );
+                throw new AdvancedTypographicTableFormatException ( "feature must not be wildcard" );
             } else {
                 this.script = script;
                 this.language = language;
@@ -516,18 +516,18 @@ public class GlyphTable {
 
         private void validateSubtable ( GlyphSubtable subtable ) {
             if ( subtable == null ) {
-                throw new IllegalArgumentException ( "subtable must be non-null" );
+                throw new AdvancedTypographicTableFormatException ( "subtable must be non-null" );
             }
             if ( subtable instanceof GlyphSubstitutionSubtable ) {
                 if ( doesPos ) {
-                    throw new IllegalArgumentException ( "subtable must be positioning subtable, but is: " + subtable );
+                    throw new AdvancedTypographicTableFormatException ( "subtable must be positioning subtable, but is: " + subtable );
                 } else {
                     doesSub = true;
                 }
             }
             if ( subtable instanceof GlyphPositioningSubtable ) {
                 if ( doesSub ) {
-                    throw new IllegalArgumentException ( "subtable must be substitution subtable, but is: " + subtable );
+                    throw new AdvancedTypographicTableFormatException ( "subtable must be substitution subtable, but is: " + subtable );
                 } else {
                     doesPos = true;
                 }
@@ -535,7 +535,7 @@ public class GlyphTable {
             if ( subtables.size() > 0 ) {
                 GlyphSubtable st = (GlyphSubtable) subtables.get(0);
                 if ( ! st.isCompatible ( subtable ) ) {
-                    throw new IllegalArgumentException ( "subtable " + subtable + " is not compatible with subtable " + st );
+                    throw new AdvancedTypographicTableFormatException ( "subtable " + subtable + " is not compatible with subtable " + st );
                 }
             }
         }
@@ -1200,12 +1200,12 @@ public class GlyphTable {
         /**
          * Instantiate a Rule Set.
          * @param rules the rules
-         * @throws IllegalArgumentException if rules or some element of rules is null
+         * @throws AdvancedTypographicTableFormatException if rules or some element of rules is null
          */
-        public RuleSet ( Rule[] rules ) throws IllegalArgumentException {
+        public RuleSet ( Rule[] rules ) throws AdvancedTypographicTableFormatException {
             // enforce rules array instance
             if ( rules == null ) {
-                throw new IllegalArgumentException ( "rules[] is null" );
+                throw new AdvancedTypographicTableFormatException ( "rules[] is null" );
             }
             this.rules = rules;
         }
@@ -1246,9 +1246,9 @@ public class GlyphTable {
         /**
          * Instantiate a Homogeneous Rule Set.
          * @param rules the rules
-         * @throws IllegalArgumentException if some rule[i] is not an instance of rule[0]
+         * @throws AdvancedTypographicTableFormatException if some rule[i] is not an instance of rule[0]
          */
-        public HomogeneousRuleSet ( Rule[] rules ) throws IllegalArgumentException {
+        public HomogeneousRuleSet ( Rule[] rules ) throws AdvancedTypographicTableFormatException {
             super ( rules );
             // find first non-null rule
             Rule r0 = null;
@@ -1263,7 +1263,7 @@ public class GlyphTable {
                 for ( int i = 1, n = rules.length; i < n; i++ ) {
                     Rule r = rules[i];
                     if ( ( r != null ) && ! c.isInstance ( r ) ) {
-                        throw new IllegalArgumentException ( "rules[" + i + "] is not an instance of " + c.getName() );
+                        throw new AdvancedTypographicTableFormatException ( "rules[" + i + "] is not an instance of " + c.getName() );
                     }
                 }
             }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFFile.java?rev=1078249&r1=1078248&r2=1078249&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFFile.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFFile.java Sat Mar  5 09:06:59 2011
@@ -31,6 +31,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.xmlgraphics.fonts.Glyphs;
 
+import org.apache.fop.fonts.AdvancedTypographicTableFormatException;
 import org.apache.fop.fonts.FontUtil;
 import org.apache.fop.fonts.GlyphClassTable;
 import org.apache.fop.fonts.GlyphCoverageTable;
@@ -626,9 +627,20 @@ public class TTFFile {
         createCMaps();
 
         readKerning(in);
-        readGDEF(in);
-        readGSUB(in);
-        readGPOS(in);
+
+        // Read advanced typographic tables. If any format exception,
+        // reset (thus ignoring) all advanced typographic tables.
+        try {
+            readGDEF(in);
+            readGSUB(in);
+            readGPOS(in);
+        } catch ( AdvancedTypographicTableFormatException e ) {
+            resetATStateAll();
+            log.warn ( "Encountered format constraint violation in advanced (typographic) table (AT) "
+                       + "in font '" + getFullName() + "', ignoring AT data: "
+                       + e.getMessage() );
+        }
+
         guessVerticalMetricsFromGlyphBBox();
         return true;
     }
@@ -658,7 +670,7 @@ public class TTFFile {
         for ( int i = 0, n = numberOfGlyphs; i < n; i++ ) {
             Integer uc = glyphToUnicode ( i );
             if ( uc == null ) {
-                while ( ( nextPrivateUse < 0xF900 ) && ( unicodeToGlyphMap.get(new Integer(nextPrivateUse)) != null ) ) {
+                while ( ( nextPrivateUse < 0xF900 ) && ( unicodeToGlyphMap.get(Integer.valueOf(nextPrivateUse)) != null ) ) {
                     nextPrivateUse++;
                 }
                 if ( nextPrivateUse < 0xF900 ) {
@@ -1823,11 +1835,11 @@ public class TTFFile {
     }
 
     /**
-     * Determine if script extension is present.
-     * @return true if script extension is present
+     * Determine if advanced (typographic) table is present.
+     * @return true if advanced (typographic) table is present
      */
-    public boolean hasScriptExtension() {
-        return ( gsub != null ) || ( gpos != null );
+    public boolean hasAdvancedTable() {
+        return ( gdef != null ) || ( gsub != null ) || ( gpos != null );
     }
 
     /**
@@ -2147,7 +2159,7 @@ public class TTFFile {
         } else if ( cf == 2 ) {
             gct = readCoverageTableFormat2 ( in, label, tableOffset, cf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported coverage table format: " + cf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported coverage table format: " + cf );
         }
         in.seekSet ( cp );
         return gct;
@@ -2211,7 +2223,7 @@ public class TTFFile {
         } else if ( cf == 2 ) {
             gct = readClassDefTableFormat2 ( in, label, tableOffset, cf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported class definition table format: " + cf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported class definition table format: " + cf );
         }
         in.seekSet ( cp );
         return gct;
@@ -2275,7 +2287,7 @@ public class TTFFile {
         } else if ( sf == 2 ) {
             readSingleSubTableFormat2 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported single substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported single substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -2333,7 +2345,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readMultipleSubTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported multiple substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported multiple substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -2385,7 +2397,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readAlternateSubTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported alternate substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported alternate substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -2451,7 +2463,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readLigatureSubTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported ligature substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported ligature substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -2714,7 +2726,7 @@ public class TTFFile {
         } else if ( sf == 3 ) {
             readContextualSubTableFormat3 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported contextual substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported contextual substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -3056,7 +3068,7 @@ public class TTFFile {
         } else if ( sf == 3 ) {
             readChainedContextualSubTableFormat3 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported chained contextual substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported chained contextual substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -3087,7 +3099,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readExtensionSubTableFormat1 ( in, lookupType, lookupFlags, lookupSequence, subtableSequence, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported extension substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported extension substitution subtable format: " + sf );
         }
         return sf;
     }
@@ -3174,13 +3186,13 @@ public class TTFFile {
         if ( sf == 1 ) {
             readReverseChainedSingleSubTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported reverse chained single substitution subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported reverse chained single substitution subtable format: " + sf );
         }
         return sf;
     }
 
     private void readGSUBSubtable(FontFileReader in, int lookupType, int lookupFlags, int lookupSequence, int subtableSequence, long subtableOffset) throws IOException {
-        initSESubState();
+        initATSubState();
         int subtableFormat = -1;
         switch ( lookupType ) {
         case GSUBLookupType.SINGLE:
@@ -3211,7 +3223,7 @@ public class TTFFile {
             break;
         }
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_SUBSTITUTION, lookupType, lookupFlags, lookupSequence, subtableSequence, subtableFormat );
-        resetSESubState();
+        resetATSubState();
     }
 
     private GlyphPositioningTable.DeviceTable readPosDeviceTable(FontFileReader in, long subtableOffset, long deviceTableOffset) throws IOException {
@@ -3234,7 +3246,7 @@ public class TTFFile {
         } else if ( df == 3 ) {
             s1 = 8; m1 = 0xFF; dm = 127; dd = 256; s2 = 8;
         } else {
-            throw new UnsupportedOperationException ( "unsupported device table delta format: " + df );
+            throw new AdvancedTypographicTableFormatException ( "unsupported device table delta format: " + df );
         }
         for ( int i = 0; ( i < n ) && ( s2 > 0 );) {
             int p = in.readTTFUShort();
@@ -3385,7 +3397,7 @@ public class TTFFile {
         } else if ( sf == 2 ) {
             readSinglePosTableFormat2 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported single positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported single positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -3539,7 +3551,7 @@ public class TTFFile {
         } else if ( sf == 2 ) {
             readPairPosTableFormat2 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported pair positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported pair positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -3589,7 +3601,7 @@ public class TTFFile {
             }
             a = new GlyphPositioningTable.Anchor ( x, y, xd, yd );
         } else {
-            throw new UnsupportedOperationException ( "unsupported positioning anchor format: " + af );
+            throw new AdvancedTypographicTableFormatException ( "unsupported positioning anchor format: " + af );
         }
         in.seekSet(cp);
         return a;
@@ -3656,7 +3668,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readCursivePosTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported cursive positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported cursive positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -3763,7 +3775,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readMarkToBasePosTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported mark-to-base positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported mark-to-base positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -3898,7 +3910,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readMarkToLigaturePosTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported mark-to-ligature positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported mark-to-ligature positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -4004,7 +4016,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readMarkToMarkPosTableFormat1 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported mark-to-mark positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported mark-to-mark positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -4252,7 +4264,7 @@ public class TTFFile {
         } else if ( sf == 3 ) {
             readContextualPosTableFormat3 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported contextual positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported contextual positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -4594,7 +4606,7 @@ public class TTFFile {
         } else if ( sf == 3 ) {
             readChainedContextualPosTableFormat3 ( in, lookupType, lookupFlags, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported chained contextual positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported chained contextual positioning subtable format: " + sf );
         }
         return sf;
     }
@@ -4625,13 +4637,13 @@ public class TTFFile {
         if ( sf == 1 ) {
             readExtensionPosTableFormat1 ( in, lookupType, lookupFlags, lookupSequence, subtableSequence, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported extension positioning subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported extension positioning subtable format: " + sf );
         }
         return sf;
     }
 
     private void readGPOSSubtable(FontFileReader in, int lookupType, int lookupFlags, int lookupSequence, int subtableSequence, long subtableOffset) throws IOException {
-        initSESubState();
+        initATSubState();
         int subtableFormat = -1;
         switch ( lookupType ) {
         case GPOSLookupType.SINGLE:
@@ -4665,7 +4677,7 @@ public class TTFFile {
             break;
         }
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_POSITIONING, lookupType, lookupFlags, lookupSequence, subtableSequence, subtableFormat );
-        resetSESubState();
+        resetATSubState();
     }
 
     private void readLookupTable(FontFileReader in, String tableTag, int lookupSequence, long lookupTable) throws IOException {
@@ -4769,7 +4781,7 @@ public class TTFFile {
     }
 
     private void readGDEFClassDefTable(FontFileReader in, String tableTag, int lookupSequence, long subtableOffset) throws IOException {
-        initSESubState();
+        initATSubState();
         in.seekSet(subtableOffset);
         // subtable is a bare class definition table
         GlyphClassTable ct = readClassDefTable ( in, tableTag + " glyph class definition table", subtableOffset );
@@ -4777,11 +4789,11 @@ public class TTFFile {
         seMapping = ct;
         // extract subtable
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_DEFINITION, GDEFLookupType.GLYPH_CLASS, 0, lookupSequence, 0, 1 );
-        resetSESubState();
+        resetATSubState();
     }
 
     private void readGDEFAttachmentTable(FontFileReader in, String tableTag, int lookupSequence, long subtableOffset) throws IOException {
-        initSESubState();
+        initATSubState();
         in.seekSet(subtableOffset);
         // read coverage offset
         int co = in.readTTFUShort();
@@ -4795,11 +4807,11 @@ public class TTFFile {
         seMapping = ct;
         // extract subtable
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_DEFINITION, GDEFLookupType.ATTACHMENT_POINT, 0, lookupSequence, 0, 1 );
-        resetSESubState();
+        resetATSubState();
     }
 
     private void readGDEFLigatureCaretTable(FontFileReader in, String tableTag, int lookupSequence, long subtableOffset) throws IOException {
-        initSESubState();
+        initATSubState();
         in.seekSet(subtableOffset);
         // read coverage offset
         int co = in.readTTFUShort();
@@ -4825,11 +4837,11 @@ public class TTFFile {
         seMapping = ct;
         // extract subtable
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_DEFINITION, GDEFLookupType.LIGATURE_CARET, 0, lookupSequence, 0, 1 );
-        resetSESubState();
+        resetATSubState();
     }
 
     private void readGDEFMarkAttachmentTable(FontFileReader in, String tableTag, int lookupSequence, long subtableOffset) throws IOException {
-        initSESubState();
+        initATSubState();
         in.seekSet(subtableOffset);
         // subtable is a bare class definition table
         GlyphClassTable ct = readClassDefTable ( in, tableTag + " glyph class definition table", subtableOffset );
@@ -4837,11 +4849,11 @@ public class TTFFile {
         seMapping = ct;
         // extract subtable
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_DEFINITION, GDEFLookupType.MARK_ATTACHMENT, 0, lookupSequence, 0, 1 );
-        resetSESubState();
+        resetATSubState();
     }
 
     private void readGDEFMarkGlyphsTableFormat1(FontFileReader in, String tableTag, int lookupSequence, long subtableOffset, int subtableFormat) throws IOException {
-        initSESubState();
+        initATSubState();
         in.seekSet(subtableOffset);
         // skip over format (already known)
         in.skip ( 2 );
@@ -4871,7 +4883,7 @@ public class TTFFile {
         seMapping = ct;
         // extract subtable
         extractSESubState ( GlyphTable.GLYPH_TABLE_TYPE_DEFINITION, GDEFLookupType.MARK_ATTACHMENT, 0, lookupSequence, 0, 1 );
-        resetSESubState();
+        resetATSubState();
     }
 
     private void readGDEFMarkGlyphsTable(FontFileReader in, String tableTag, int lookupSequence, long subtableOffset) throws IOException {
@@ -4881,7 +4893,7 @@ public class TTFFile {
         if ( sf == 1 ) {
             readGDEFMarkGlyphsTableFormat1 ( in, tableTag, lookupSequence, subtableOffset, sf );
         } else {
-            throw new UnsupportedOperationException ( "unsupported mark glyph sets subtable format: " + sf );
+            throw new AdvancedTypographicTableFormatException ( "unsupported mark glyph sets subtable format: " + sf );
         }
     }
 
@@ -4893,7 +4905,7 @@ public class TTFFile {
     private void readGDEF(FontFileReader in) throws IOException {
         String tableTag = "GDEF";
         // Initialize temporary state
-        initSEState();
+        initATState();
         // Read glyph definition (GDEF) table
         TTFDirTabEntry dirTab = (TTFDirTabEntry)dirTabs.get(tableTag);
         if ( gdef != null ) {
@@ -4967,7 +4979,7 @@ public class TTFFile {
     private void readGSUB(FontFileReader in) throws IOException {
         String tableTag = "GSUB";
         // Initialize temporary state
-        initSEState();
+        initATState();
         // Read glyph substitution (GSUB) table
         TTFDirTabEntry dirTab = (TTFDirTabEntry)dirTabs.get(tableTag);
         if ( gpos != null ) {
@@ -5005,7 +5017,7 @@ public class TTFFile {
     private void readGPOS(FontFileReader in) throws IOException {
         String tableTag = "GPOS";
         // Initialize temporary state
-        initSEState();
+        initATState();
         // Read glyph positioning (GPOS) table
         TTFDirTabEntry dirTab = (TTFDirTabEntry)dirTabs.get(tableTag);
         if ( gpos != null ) {
@@ -5048,7 +5060,7 @@ public class TTFFile {
                 gdef = new GlyphDefinitionTable ( subtables );
             }
         }
-        resetSEState();
+        resetATState();
         return gdef;
     }
 
@@ -5068,7 +5080,7 @@ public class TTFFile {
                 }
             }
         }
-        resetSEState();
+        resetATState();
         return gsub;
     }
 
@@ -5088,7 +5100,7 @@ public class TTFFile {
                 }
             }
         }
-        resetSEState();
+        resetATState();
         return gpos;
     }
 
@@ -5259,23 +5271,23 @@ public class TTFFile {
         return st;
     }
 
-    private void initSEState() {
+    private void initATState() {
         seScripts = new java.util.LinkedHashMap();
         seLanguages = new java.util.LinkedHashMap();
         seFeatures = new java.util.LinkedHashMap();
         seSubtables = new java.util.ArrayList();
-        resetSESubState();
+        resetATSubState();
     }
 
-    private void resetSEState() {
+    private void resetATState() {
         seScripts = null;
         seLanguages = null;
         seFeatures = null;
         seSubtables = null;
-        resetSESubState();
+        resetATSubState();
     }
 
-    private void initSESubState() {
+    private void initATSubState() {
         seMapping = null;
         seEntries = new java.util.ArrayList();
     }
@@ -5296,11 +5308,16 @@ public class TTFFile {
         }
     }
 
-    private void resetSESubState() {
+    private void resetATSubState() {
         seMapping = null;
         seEntries = null;
     }
 
+    private void resetATStateAll() {
+        resetATState();
+        gdef = null; gsub = null; gpos = null;
+    }
+
     /**
      * Return a List with TTFCmapEntry.
      * @return A list of TTFCmapEntry objects



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message