You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2013/04/09 19:31:45 UTC

svn commit: r1466146 [12/20] - in /xmlgraphics/fop/trunk: ./ src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/ src/codegen/unicode/java/org/apache/fop/text/linebreak/ src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/modca/ src/java/o...

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java?rev=1466146&r1=1466145&r2=1466146&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java Tue Apr  9 17:31:41 2013
@@ -105,15 +105,15 @@ public class IndicScriptProcessor extend
 
     private static class SubstitutionScriptContextTester implements ScriptContextTester {
         private static Map/*<String,GlyphContextTester>*/ testerMap = new HashMap/*<String,GlyphContextTester>*/();
-        public GlyphContextTester getTester ( String feature ) {
-            return (GlyphContextTester) testerMap.get ( feature );
+        public GlyphContextTester getTester (String feature) {
+            return (GlyphContextTester) testerMap.get (feature);
         }
     }
 
     private static class PositioningScriptContextTester implements ScriptContextTester {
         private static Map/*<String,GlyphContextTester>*/ testerMap = new HashMap/*<String,GlyphContextTester>*/();
-        public GlyphContextTester getTester ( String feature ) {
-            return (GlyphContextTester) testerMap.get ( feature );
+        public GlyphContextTester getTester (String feature) {
+            return (GlyphContextTester) testerMap.get (feature);
         }
     }
 
@@ -122,28 +122,28 @@ public class IndicScriptProcessor extend
      * @param script tag
      * @return script processor instance
      */
-    public static ScriptProcessor makeProcessor ( String script ) {
-        switch ( CharScript.scriptCodeFromTag ( script ) ) {
+    public static ScriptProcessor makeProcessor (String script) {
+        switch (CharScript.scriptCodeFromTag (script)) {
         case CharScript.SCRIPT_DEVANAGARI:
         case CharScript.SCRIPT_DEVANAGARI_2:
-            return new DevanagariScriptProcessor ( script );
+            return new DevanagariScriptProcessor (script);
         case CharScript.SCRIPT_GUJARATI:
         case CharScript.SCRIPT_GUJARATI_2:
-            return new GujaratiScriptProcessor ( script );
+            return new GujaratiScriptProcessor (script);
         case CharScript.SCRIPT_GURMUKHI:
         case CharScript.SCRIPT_GURMUKHI_2:
-            return new GurmukhiScriptProcessor ( script );
+            return new GurmukhiScriptProcessor (script);
         // [TBD] implement other script processors
         default:
-            return new IndicScriptProcessor ( script );
+            return new IndicScriptProcessor (script);
         }
     }
 
     private final ScriptContextTester subContextTester;
     private final ScriptContextTester posContextTester;
 
-    IndicScriptProcessor ( String script ) {
-        super ( script );
+    IndicScriptProcessor (String script) {
+        super (script);
         this.subContextTester = new SubstitutionScriptContextTester();
         this.posContextTester = new PositioningScriptContextTester();
     }
@@ -180,38 +180,38 @@ public class IndicScriptProcessor extend
 
     /** {@inheritDoc} */
     @Override
-    public GlyphSequence substitute ( GlyphSequence gs, String script, String language, GlyphTable.UseSpec[] usa, ScriptContextTester sct ) {
+    public GlyphSequence substitute (GlyphSequence gs, String script, String language, GlyphTable.UseSpec[] usa, ScriptContextTester sct) {
         assert usa != null;
         // 1. syllabize
-        GlyphSequence[] sa = syllabize ( gs, script, language );
+        GlyphSequence[] sa = syllabize (gs, script, language);
         // 2. process each syllable
-        for ( int i = 0, n = sa.length; i < n; i++ ) {
+        for (int i = 0, n = sa.length; i < n; i++) {
             GlyphSequence s = sa [ i ];
             // apply basic shaping subs
-            for ( int j = 0, m = usa.length; j < m; j++ ) {
+            for (int j = 0, m = usa.length; j < m; j++) {
                 GlyphTable.UseSpec us = usa [ j ];
-                if ( isBasicShapingUse ( us ) ) {
-                    s.setPredications ( true );
-                    s = us.substitute ( s, script, language, sct );
+                if (isBasicShapingUse (us)) {
+                    s.setPredications (true);
+                    s = us.substitute (s, script, language, sct);
                 }
             }
             // reorder pre-base matra
-            s = reorderPreBaseMatra ( s );
+            s = reorderPreBaseMatra (s);
             // reorder reph
-            s = reorderReph ( s );
+            s = reorderReph (s);
             // apply presentation subs
-            for ( int j = 0, m = usa.length; j < m; j++ ) {
+            for (int j = 0, m = usa.length; j < m; j++) {
                 GlyphTable.UseSpec us = usa [ j ];
-                if ( isPresentationUse ( us ) ) {
-                    s.setPredications ( true );
-                    s = us.substitute ( s, script, language, sct );
+                if (isPresentationUse (us)) {
+                    s.setPredications (true);
+                    s = us.substitute (s, script, language, sct);
                 }
             }
             // record result
             sa [ i ] = s;
         }
         // 3. return reassembled substituted syllables
-        return unsyllabize ( gs, sa );
+        return unsyllabize (gs, sa);
     }
 
     /**
@@ -222,12 +222,12 @@ public class IndicScriptProcessor extend
         return null;
     }
 
-    private GlyphSequence[] syllabize ( GlyphSequence gs, String script, String language ) {
-        return Syllabizer.getSyllabizer ( script, language, getSyllabizerClass() ) . syllabize ( gs );
+    private GlyphSequence[] syllabize (GlyphSequence gs, String script, String language) {
+        return Syllabizer.getSyllabizer (script, language, getSyllabizerClass()) . syllabize (gs);
     }
 
-    private GlyphSequence unsyllabize ( GlyphSequence gs, GlyphSequence[] sa ) {
-        return GlyphSequence.join ( gs, sa );
+    private GlyphSequence unsyllabize (GlyphSequence gs, GlyphSequence[] sa) {
+        return GlyphSequence.join (gs, sa);
     }
 
     private static Set<String> basicShapingFeatures;
@@ -247,14 +247,14 @@ public class IndicScriptProcessor extend
     };
     static {
         basicShapingFeatures = new HashSet<String>();
-        for ( String s : basicShapingFeatureStrings ) {
-            basicShapingFeatures.add ( s );
+        for (String s : basicShapingFeatureStrings) {
+            basicShapingFeatures.add (s);
         }
     }
-    private boolean isBasicShapingUse ( GlyphTable.UseSpec us ) {
+    private boolean isBasicShapingUse (GlyphTable.UseSpec us) {
         assert us != null;
-        if ( basicShapingFeatures != null ) {
-            return basicShapingFeatures.contains ( us.getFeature() );
+        if (basicShapingFeatures != null) {
+            return basicShapingFeatures.contains (us.getFeature());
         } else {
             return false;
         }
@@ -271,26 +271,26 @@ public class IndicScriptProcessor extend
     };
     static {
         presentationFeatures = new HashSet<String>();
-        for ( String s : presentationFeatureStrings ) {
-            presentationFeatures.add ( s );
+        for (String s : presentationFeatureStrings) {
+            presentationFeatures.add (s);
         }
     }
-    private boolean isPresentationUse ( GlyphTable.UseSpec us ) {
+    private boolean isPresentationUse (GlyphTable.UseSpec us) {
         assert us != null;
-        if ( presentationFeatures != null ) {
-            return presentationFeatures.contains ( us.getFeature() );
+        if (presentationFeatures != null) {
+            return presentationFeatures.contains (us.getFeature());
         } else {
             return false;
         }
     }
 
-    private GlyphSequence reorderPreBaseMatra ( GlyphSequence gs ) {
+    private GlyphSequence reorderPreBaseMatra (GlyphSequence gs) {
         int source;
-        if ( ( source = findPreBaseMatra ( gs ) ) >= 0 ) {
+        if ((source = findPreBaseMatra (gs)) >= 0) {
             int target;
-            if ( ( target = findPreBaseMatraTarget ( gs, source ) ) >= 0 ) {
-                if ( target != source ) {
-                    gs = reorder ( gs, source, target );
+            if ((target = findPreBaseMatraTarget (gs, source)) >= 0) {
+                if (target != source) {
+                    gs = reorder (gs, source, target);
                 }
             }
         }
@@ -302,7 +302,7 @@ public class IndicScriptProcessor extend
      * @param gs input sequence
      * @return index of pre-base matra or -1 if not found
      */
-    protected int findPreBaseMatra ( GlyphSequence gs ) {
+    protected int findPreBaseMatra (GlyphSequence gs) {
         return -1;
     }
 
@@ -312,17 +312,17 @@ public class IndicScriptProcessor extend
      * @param source index of pre-base matra
      * @return index of pre-base matra target or -1
      */
-    protected int findPreBaseMatraTarget ( GlyphSequence gs, int source ) {
+    protected int findPreBaseMatraTarget (GlyphSequence gs, int source) {
         return -1;
     }
 
-    private GlyphSequence reorderReph ( GlyphSequence gs ) {
+    private GlyphSequence reorderReph (GlyphSequence gs) {
         int source;
-        if ( ( source = findReph ( gs ) ) >= 0 ) {
+        if ((source = findReph (gs)) >= 0) {
             int target;
-            if ( ( target = findRephTarget ( gs, source ) ) >= 0 ) {
-                if ( target != source ) {
-                    gs = reorder ( gs, source, target );
+            if ((target = findRephTarget (gs, source)) >= 0) {
+                if (target != source) {
+                    gs = reorder (gs, source, target);
                 }
             }
         }
@@ -334,7 +334,7 @@ public class IndicScriptProcessor extend
      * @param gs input sequence
      * @return index of reph or -1 if not found
      */
-    protected int findReph ( GlyphSequence gs ) {
+    protected int findReph (GlyphSequence gs) {
         return -1;
     }
 
@@ -344,18 +344,18 @@ public class IndicScriptProcessor extend
      * @param source index of reph
      * @return index of reph target or -1
      */
-    protected int findRephTarget ( GlyphSequence gs, int source ) {
+    protected int findRephTarget (GlyphSequence gs, int source) {
         return -1;
     }
 
-    private GlyphSequence reorder ( GlyphSequence gs, int source, int target ) {
-        return GlyphSequence.reorder ( gs, source, 1, target );
+    private GlyphSequence reorder (GlyphSequence gs, int source, int target) {
+        return GlyphSequence.reorder (gs, source, 1, target);
     }
 
     /** {@inheritDoc} */
     @Override
-    public boolean position ( GlyphSequence gs, String script, String language, int fontSize, GlyphTable.UseSpec[] usa, int[] widths, int[][] adjustments, ScriptContextTester sct ) {
-        boolean adjusted = super.position ( gs, script, language, fontSize, usa, widths, adjustments, sct );
+    public boolean position (GlyphSequence gs, String script, String language, int fontSize, GlyphTable.UseSpec[] usa, int[] widths, int[][] adjustments, ScriptContextTester sct) {
+        boolean adjusted = super.position (gs, script, language, fontSize, usa, widths, adjustments, sct);
         return adjusted;
     }
 
@@ -363,7 +363,7 @@ public class IndicScriptProcessor extend
     protected abstract static class Syllabizer implements Comparable {
         private String script;
         private String language;
-        Syllabizer ( String script, String language ) {
+        Syllabizer (String script, String language) {
             this.script = script;
             this.language = language;
         }
@@ -373,21 +373,21 @@ public class IndicScriptProcessor extend
          * @param gs input glyph sequence
          * @return segmented syllabic glyph sequences
          */
-        abstract GlyphSequence[] syllabize ( GlyphSequence gs );
+        abstract GlyphSequence[] syllabize (GlyphSequence gs);
         /** {@inheritDoc} */
         public int hashCode() {
             int hc = 0;
-            hc =  7 * hc + ( hc ^ script.hashCode() );
-            hc = 11 * hc + ( hc ^ language.hashCode() );
+            hc =  7 * hc + (hc ^ script.hashCode());
+            hc = 11 * hc + (hc ^ language.hashCode());
             return hc;
         }
         /** {@inheritDoc} */
-        public boolean equals ( Object o ) {
-            if ( o instanceof Syllabizer ) {
+        public boolean equals (Object o) {
+            if (o instanceof Syllabizer) {
                 Syllabizer s = (Syllabizer) o;
-                if ( ! s.script.equals ( script ) ) {
+                if (! s.script.equals (script)) {
                     return false;
-                } else if ( ! s.language.equals ( language ) ) {
+                } else if (! s.language.equals (language)) {
                     return false;
                 } else {
                     return true;
@@ -397,12 +397,12 @@ public class IndicScriptProcessor extend
             }
         }
         /** {@inheritDoc} */
-        public int compareTo ( Object o ) {
+        public int compareTo (Object o) {
             int d;
-            if ( o instanceof Syllabizer ) {
+            if (o instanceof Syllabizer) {
                 Syllabizer s = (Syllabizer) o;
-                if ( ( d = script.compareTo ( s.script ) ) == 0 ) {
-                    d = language.compareTo ( s.language );
+                if ((d = script.compareTo (s.script)) == 0) {
+                    d = language.compareTo (s.language);
                 }
             } else {
                 d = -1;
@@ -410,32 +410,32 @@ public class IndicScriptProcessor extend
             return d;
         }
         private static Map<String,Syllabizer> syllabizers = new HashMap<String,Syllabizer>();
-        static Syllabizer getSyllabizer ( String script, String language, Class<? extends Syllabizer> syllabizerClass ) {
-            String sid = makeSyllabizerId ( script, language );
-            Syllabizer s = syllabizers.get ( sid );
-            if ( s == null ) {
-                if ( ( s = makeSyllabizer ( script, language, syllabizerClass ) ) == null ) {
-                    s = new DefaultSyllabizer ( script, language );
+        static Syllabizer getSyllabizer (String script, String language, Class<? extends Syllabizer> syllabizerClass) {
+            String sid = makeSyllabizerId (script, language);
+            Syllabizer s = syllabizers.get (sid);
+            if (s == null) {
+                if ((s = makeSyllabizer (script, language, syllabizerClass)) == null) {
+                    s = new DefaultSyllabizer (script, language);
                 }
-                syllabizers.put ( sid, s );
+                syllabizers.put (sid, s);
             }
             return s;
         }
-        static String makeSyllabizerId ( String script, String language ) {
+        static String makeSyllabizerId (String script, String language) {
             return script + ":" + language;
         }
-        static Syllabizer makeSyllabizer ( String script, String language, Class<? extends Syllabizer> syllabizerClass ) {
+        static Syllabizer makeSyllabizer (String script, String language, Class<? extends Syllabizer> syllabizerClass) {
             Syllabizer s;
             try {
-                Constructor<? extends Syllabizer> cf = syllabizerClass.getDeclaredConstructor ( new Class[] { String.class, String.class } );
-                s = (Syllabizer) cf.newInstance ( script, language );
-            } catch ( NoSuchMethodException e ) {
+                Constructor<? extends Syllabizer> cf = syllabizerClass.getDeclaredConstructor (new Class[] { String.class, String.class });
+                s = (Syllabizer) cf.newInstance (script, language);
+            } catch (NoSuchMethodException e) {
                 s = null;
-            } catch ( InstantiationException e ) {
+            } catch (InstantiationException e) {
                 s = null;
-            } catch ( IllegalAccessException e ) {
+            } catch (IllegalAccessException e) {
                 s = null;
-            } catch ( InvocationTargetException e ) {
+            } catch (InvocationTargetException e) {
                 s = null;
             }
             return s;
@@ -444,18 +444,18 @@ public class IndicScriptProcessor extend
 
     /** Default syllabizer. */
     protected static class DefaultSyllabizer extends Syllabizer {
-        DefaultSyllabizer ( String script, String language ) {
-            super ( script, language );
+        DefaultSyllabizer (String script, String language) {
+            super (script, language);
         }
         /** {@inheritDoc} */
         @Override
-        GlyphSequence[] syllabize ( GlyphSequence gs ) {
-            int[] ca = gs.getCharacterArray ( false );
+        GlyphSequence[] syllabize (GlyphSequence gs) {
+            int[] ca = gs.getCharacterArray (false);
             int   nc = gs.getCharacterCount();
-            if ( nc == 0 ) {
+            if (nc == 0) {
                 return new GlyphSequence[] { gs };
             } else {
-                return segmentize ( gs, segmentize ( ca, nc ) );
+                return segmentize (gs, segmentize (ca, nc));
             }
         }
         /**
@@ -464,30 +464,30 @@ public class IndicScriptProcessor extend
          * @param nc number of characters in sequence
          * @return array of syllable segments
          */
-        protected Segment[] segmentize ( int[] ca, int nc ) {
-            Vector<Segment> sv = new Vector<Segment> ( nc );
-            for ( int s = 0, e = nc; s < e; ) {
+        protected Segment[] segmentize (int[] ca, int nc) {
+            Vector<Segment> sv = new Vector<Segment> (nc);
+            for (int s = 0, e = nc; s < e; ) {
                 int i;
-                if ( ( i = findStartOfSyllable ( ca, s, e ) ) > s ) {
+                if ((i = findStartOfSyllable (ca, s, e)) > s) {
                     // from s to i is non-syllable segment
-                    sv.add ( new Segment ( s, i, Segment.OTHER ) );
+                    sv.add (new Segment (s, i, Segment.OTHER));
                     s = i; // move s to start of syllable
-                } else if ( i > s ) {
+                } else if (i > s) {
                     // from s to e is non-syllable segment
-                    sv.add ( new Segment ( s, e, Segment.OTHER ) );
+                    sv.add (new Segment (s, e, Segment.OTHER));
                     s = e; // move s to end of input sequence
                 }
-                if ( ( i = findEndOfSyllable ( ca, s, e ) ) > s ) {
+                if ((i = findEndOfSyllable (ca, s, e)) > s) {
                     // from s to i is syllable segment
-                    sv.add ( new Segment ( s, i, Segment.SYLLABLE ) );
+                    sv.add (new Segment (s, i, Segment.SYLLABLE));
                     s = i; // move s to end of syllable
                 } else {
                     // from s to e is non-syllable segment
-                    sv.add ( new Segment ( s, e, Segment.OTHER ) );
+                    sv.add (new Segment (s, e, Segment.OTHER));
                     s = e; // move s to end of input sequence
                 }
             }
-            return sv.toArray ( new Segment [ sv.size() ] );
+            return sv.toArray (new Segment [ sv.size() ]);
         }
         /**
          * Construct array of glyph sequences from original glyph sequence and segment array.
@@ -495,28 +495,28 @@ public class IndicScriptProcessor extend
          * @param sa segment array
          * @return array of glyph sequences each belonging to an (ordered) segment in SA
          */
-        protected GlyphSequence[] segmentize ( GlyphSequence gs, Segment[] sa ) {
+        protected GlyphSequence[] segmentize (GlyphSequence gs, Segment[] sa) {
             int   ng = gs.getGlyphCount();
-            int[] ga = gs.getGlyphArray ( false );
-            GlyphSequence.CharAssociation[] aa = gs.getAssociations ( 0, -1 );
+            int[] ga = gs.getGlyphArray (false);
+            GlyphSequence.CharAssociation[] aa = gs.getAssociations (0, -1);
             Vector<GlyphSequence> nsv = new Vector<GlyphSequence>();
-            for ( int i = 0, ns = sa.length; i < ns; i++ ) {
+            for (int i = 0, ns = sa.length; i < ns; i++) {
                 Segment s = sa [ i ];
-                Vector<Integer> ngv = new Vector<Integer> ( ng );
-                Vector<GlyphSequence.CharAssociation> nav = new Vector<GlyphSequence.CharAssociation> ( ng );
-                for ( int j = 0; j < ng; j++ ) {
+                Vector<Integer> ngv = new Vector<Integer> (ng);
+                Vector<GlyphSequence.CharAssociation> nav = new Vector<GlyphSequence.CharAssociation> (ng);
+                for (int j = 0; j < ng; j++) {
                     GlyphSequence.CharAssociation ca = aa [ j ];
-                    if ( ca.contained ( s.getOffset(), s.getCount() ) ) {
-                        ngv.add ( ga [ j ] );
-                        nav.add ( ca );
+                    if (ca.contained (s.getOffset(), s.getCount())) {
+                        ngv.add (ga [ j ]);
+                        nav.add (ca);
                     }
                 }
-                if ( ngv.size() > 0 ) {
-                    nsv.add ( new GlyphSequence ( gs, null, toIntArray ( ngv ), null, null, nav.toArray ( new GlyphSequence.CharAssociation [ nav.size() ] ), null ) );
+                if (ngv.size() > 0) {
+                    nsv.add (new GlyphSequence (gs, null, toIntArray (ngv), null, null, nav.toArray (new GlyphSequence.CharAssociation [ nav.size() ]), null));
                 }
             }
-            if ( nsv.size() > 0 ) {
-                return nsv.toArray ( new GlyphSequence [ nsv.size() ] );
+            if (nsv.size() > 0) {
+                return nsv.toArray (new GlyphSequence [ nsv.size() ]);
             } else {
                 return new GlyphSequence[] { gs };
             }
@@ -528,7 +528,7 @@ public class IndicScriptProcessor extend
          * @param e end index
          * @return index of start or E if no start found
          */
-        protected int findStartOfSyllable ( int[] ca, int s, int e ) {
+        protected int findStartOfSyllable (int[] ca, int s, int e) {
             return e;
         }
         /**
@@ -538,14 +538,14 @@ public class IndicScriptProcessor extend
          * @param e end index
          * @return index of start or S if no end found
          */
-        protected int findEndOfSyllable ( int[] ca, int s, int e ) {
+        protected int findEndOfSyllable (int[] ca, int s, int e) {
             return s;
         }
-        private static int[] toIntArray ( Vector<Integer> iv ) {
+        private static int[] toIntArray (Vector<Integer> iv) {
             int ni = iv.size();
             int[] ia = new int [ iv.size() ];
-            for ( int i = 0, n = ni; i < n; i++ ) {
-                ia [ i ] = (int) iv.get ( i );
+            for (int i = 0, n = ni; i < n; i++) {
+                ia [ i ] = (int) iv.get (i);
             }
             return ia;
         }
@@ -561,7 +561,7 @@ public class IndicScriptProcessor extend
         private int end;
         private int type;
 
-        Segment ( int start, int end, int type ) {
+        Segment (int start, int end, int type) {
             this.start = start;
             this.end = end;
             this.type = type;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java?rev=1466146&r1=1466145&r2=1466146&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java Tue Apr  9 17:31:41 2013
@@ -55,9 +55,9 @@ public abstract class ScriptProcessor {
      * Instantiate a script processor.
      * @param script a script identifier
      */
-    protected ScriptProcessor ( String script ) {
-        if ( ( script == null ) || ( script.length() == 0 ) ) {
-            throw new IllegalArgumentException ( "script must be non-empty string" );
+    protected ScriptProcessor (String script) {
+        if ((script == null) || (script.length() == 0)) {
+            throw new IllegalArgumentException ("script must be non-empty string");
         } else {
             this.script = script;
             this.assembledLookups = new HashMap/*<AssembledLookupsKey,GlyphTable.UseSpec[]>*/();
@@ -98,8 +98,8 @@ public abstract class ScriptProcessor {
      * @param lookups a mapping from lookup specifications to glyph subtables to use for substitution processing
      * @return the substituted (output) glyph sequence
      */
-    public final GlyphSequence substitute ( GlyphSubstitutionTable gsub, GlyphSequence gs, String script, String language, Map/*<LookupSpec,List<LookupTable>>>*/ lookups ) {
-        return substitute ( gs, script, language, assembleLookups ( gsub, getSubstitutionFeatures(), lookups ), getSubstitutionContextTester() );
+    public final GlyphSequence substitute (GlyphSubstitutionTable gsub, GlyphSequence gs, String script, String language, Map/*<LookupSpec,List<LookupTable>>>*/ lookups) {
+        return substitute (gs, script, language, assembleLookups (gsub, getSubstitutionFeatures(), lookups), getSubstitutionContextTester());
     }
 
     /**
@@ -111,11 +111,11 @@ public abstract class ScriptProcessor {
      * @param sct a script specific context tester (or null)
      * @return the substituted (output) glyph sequence
      */
-    public GlyphSequence substitute ( GlyphSequence gs, String script, String language, GlyphTable.UseSpec[] usa, ScriptContextTester sct ) {
+    public GlyphSequence substitute (GlyphSequence gs, String script, String language, GlyphTable.UseSpec[] usa, ScriptContextTester sct) {
         assert usa != null;
-        for ( int i = 0, n = usa.length; i < n; i++ ) {
+        for (int i = 0, n = usa.length; i < n; i++) {
             GlyphTable.UseSpec us = usa [ i ];
-            gs = us.substitute ( gs, script, language, sct );
+            gs = us.substitute (gs, script, language, sct);
         }
         return gs;
     }
@@ -132,7 +132,7 @@ public abstract class ScriptProcessor {
      * @param language a language identifier
      * @return the reordered (output) glyph sequence
      */
-    public GlyphSequence reorderCombiningMarks ( GlyphDefinitionTable gdef, GlyphSequence gs, int[][] gpa, String script, String language ) {
+    public GlyphSequence reorderCombiningMarks (GlyphDefinitionTable gdef, GlyphSequence gs, int[][] gpa, String script, String language) {
         return gs;
     }
 
@@ -169,8 +169,8 @@ public abstract class ScriptProcessor {
      * with one 4-tuple for each element of glyph sequence
      * @return true if some adjustment is not zero; otherwise, false
      */
-    public final boolean position ( GlyphPositioningTable gpos, GlyphSequence gs, String script, String language, int fontSize, Map/*<LookupSpec,List<LookupTable>>*/ lookups, int[] widths, int[][] adjustments ) {
-        return position ( gs, script, language, fontSize, assembleLookups ( gpos, getPositioningFeatures(), lookups ), widths, adjustments, getPositioningContextTester() );
+    public final boolean position (GlyphPositioningTable gpos, GlyphSequence gs, String script, String language, int fontSize, Map/*<LookupSpec,List<LookupTable>>*/ lookups, int[] widths, int[][] adjustments) {
+        return position (gs, script, language, fontSize, assembleLookups (gpos, getPositioningFeatures(), lookups), widths, adjustments, getPositioningContextTester());
     }
 
     /**
@@ -186,12 +186,12 @@ public abstract class ScriptProcessor {
      * @param sct a script specific context tester (or null)
      * @return true if some adjustment is not zero; otherwise, false
      */
-    public boolean position ( GlyphSequence gs, String script, String language, int fontSize, GlyphTable.UseSpec[] usa, int[] widths, int[][] adjustments, ScriptContextTester sct ) {
+    public boolean position (GlyphSequence gs, String script, String language, int fontSize, GlyphTable.UseSpec[] usa, int[] widths, int[][] adjustments, ScriptContextTester sct) {
         assert usa != null;
         boolean adjusted = false;
-        for ( int i = 0, n = usa.length; i < n; i++ ) {
+        for (int i = 0, n = usa.length; i < n; i++) {
             GlyphTable.UseSpec us = usa [ i ];
-            if ( us.position ( gs, script, language, fontSize, widths, adjustments, sct ) ) {
+            if (us.position (gs, script, language, fontSize, widths, adjustments, sct)) {
                 adjusted = true;
             }
         }
@@ -206,22 +206,22 @@ public abstract class ScriptProcessor {
      * @param lookups a mapping from lookup specifications to lists of look tables from which to select lookup tables according to the specified features
      * @return ordered array of assembled lookup table use specifications
      */
-    public final GlyphTable.UseSpec[] assembleLookups ( GlyphTable table, String[] features, Map/*<LookupSpec,List<LookupTable>>*/ lookups ) {
-        AssembledLookupsKey key = new AssembledLookupsKey ( table, features, lookups );
+    public final GlyphTable.UseSpec[] assembleLookups (GlyphTable table, String[] features, Map/*<LookupSpec,List<LookupTable>>*/ lookups) {
+        AssembledLookupsKey key = new AssembledLookupsKey (table, features, lookups);
         GlyphTable.UseSpec[] usa;
-        if ( ( usa = assembledLookupsGet ( key ) ) != null ) {
+        if ((usa = assembledLookupsGet (key)) != null) {
             return usa;
         } else {
-            return assembledLookupsPut ( key, table.assembleLookups ( features, lookups ) );
+            return assembledLookupsPut (key, table.assembleLookups (features, lookups));
         }
     }
 
-    private GlyphTable.UseSpec[] assembledLookupsGet ( AssembledLookupsKey key ) {
-        return (GlyphTable.UseSpec[]) assembledLookups.get ( key );
+    private GlyphTable.UseSpec[] assembledLookupsGet (AssembledLookupsKey key) {
+        return (GlyphTable.UseSpec[]) assembledLookups.get (key);
     }
 
-    private GlyphTable.UseSpec[]  assembledLookupsPut ( AssembledLookupsKey key, GlyphTable.UseSpec[] usa ) {
-        assembledLookups.put ( key, usa );
+    private GlyphTable.UseSpec[]  assembledLookupsPut (AssembledLookupsKey key, GlyphTable.UseSpec[] usa) {
+        assembledLookups.put (key, usa);
         return usa;
     }
 
@@ -230,25 +230,25 @@ public abstract class ScriptProcessor {
      * @param script a script identifier
      * @return a script processor instance or null if none found
      */
-    public static synchronized ScriptProcessor getInstance ( String script ) {
+    public static synchronized ScriptProcessor getInstance (String script) {
         ScriptProcessor sp = null;
         assert processors != null;
-        if ( ( sp = processors.get ( script ) ) == null ) {
-            processors.put ( script, sp = createProcessor ( script ) );
+        if ((sp = processors.get (script)) == null) {
+            processors.put (script, sp = createProcessor (script));
         }
         return sp;
     }
 
     // [TBD] - rework to provide more configurable binding between script name and script processor constructor
-    private static ScriptProcessor createProcessor ( String script ) {
+    private static ScriptProcessor createProcessor (String script) {
         ScriptProcessor sp = null;
-        int sc = CharScript.scriptCodeFromTag ( script );
-        if ( sc == CharScript.SCRIPT_ARABIC ) {
-            sp = new ArabicScriptProcessor ( script );
-        } else if ( CharScript.isIndicScript ( sc ) ) {
-            sp = IndicScriptProcessor.makeProcessor ( script );
+        int sc = CharScript.scriptCodeFromTag (script);
+        if (sc == CharScript.SCRIPT_ARABIC) {
+            sp = new ArabicScriptProcessor (script);
+        } else if (CharScript.isIndicScript (sc)) {
+            sp = IndicScriptProcessor.makeProcessor (script);
         } else {
-            sp = new DefaultScriptProcessor ( script );
+            sp = new DefaultScriptProcessor (script);
         }
         return sp;
     }
@@ -259,7 +259,7 @@ public abstract class ScriptProcessor {
         private final String[] features;
         private final Map/*<LookupSpec,List<LookupTable>>*/ lookups;
 
-        AssembledLookupsKey ( GlyphTable table, String[] features, Map/*<LookupSpec,List<LookupTable>>*/ lookups ) {
+        AssembledLookupsKey (GlyphTable table, String[] features, Map/*<LookupSpec,List<LookupTable>>*/ lookups) {
             this.table = table;
             this.features = features;
             this.lookups = lookups;
@@ -268,21 +268,21 @@ public abstract class ScriptProcessor {
         /** {@inheritDoc} */
         public int hashCode() {
             int hc = 0;
-            hc =  7 * hc + ( hc ^ table.hashCode() );
-            hc = 11 * hc + ( hc ^ Arrays.hashCode ( features ) );
-            hc = 17 * hc + ( hc ^ lookups.hashCode() );
+            hc =  7 * hc + (hc ^ table.hashCode());
+            hc = 11 * hc + (hc ^ Arrays.hashCode (features));
+            hc = 17 * hc + (hc ^ lookups.hashCode());
             return hc;
         }
 
         /** {@inheritDoc} */
-        public boolean equals ( Object o ) {
-            if ( o instanceof AssembledLookupsKey ) {
+        public boolean equals (Object o) {
+            if (o instanceof AssembledLookupsKey) {
                 AssembledLookupsKey k = (AssembledLookupsKey) o;
-                if ( ! table.equals ( k.table ) ) {
+                if (! table.equals (k.table)) {
                     return false;
-                } else if ( ! Arrays.equals ( features, k.features ) ) {
+                } else if (! Arrays.equals (features, k.features)) {
                     return false;
-                } else if ( ! lookups.equals ( k.lookups ) ) {
+                } else if (! lookups.equals (k.lookups)) {
                     return false;
                 } else {
                     return true;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharMirror.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharMirror.java?rev=1466146&r1=1466145&r2=1466146&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharMirror.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharMirror.java Tue Apr  9 17:31:41 2013
@@ -36,10 +36,10 @@ public final class CharMirror {
      * @param s a string whose characters are to be mirrored
      * @return the resulting string
      */
-    public static String mirror ( String s ) {
-        StringBuffer sb = new StringBuffer ( s );
-        for ( int i = 0, n = sb.length(); i < n; i++ ) {
-            sb.setCharAt ( i, (char) mirror ( sb.charAt ( i ) ) );
+    public static String mirror (String s) {
+        StringBuffer sb = new StringBuffer (s);
+        for (int i = 0, n = sb.length(); i < n; i++) {
+            sb.setCharAt (i, (char) mirror (sb.charAt (i)));
         }
         return sb.toString();
     }
@@ -704,9 +704,9 @@ public final class CharMirror {
         0xFF62
     };
 
-    private static int mirror ( int c ) {
-        int i = Arrays.binarySearch ( mirroredCharacters, c );
-        if ( i < 0 ) {
+    private static int mirror (int c) {
+        int i = Arrays.binarySearch (mirroredCharacters, c);
+        if (i < 0) {
             return c;
         } else {
             return mirroredCharactersMapping [ i ];

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java?rev=1466146&r1=1466145&r2=1466146&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java Tue Apr  9 17:31:41 2013
@@ -143,24 +143,24 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character is punctuation
      */
-    public static boolean isPunctuation ( int c ) {
-        if ( ( c >= 0x0021 ) && ( c <= 0x002F ) ) {             // basic latin punctuation
+    public static boolean isPunctuation (int c) {
+        if ((c >= 0x0021) && (c <= 0x002F)) {             // basic latin punctuation
             return true;
-        } else if ( ( c >= 0x003A ) && ( c <= 0x0040 ) ) {      // basic latin punctuation
+        } else if ((c >= 0x003A) && (c <= 0x0040)) {      // basic latin punctuation
             return true;
-        } else if ( ( c >= 0x005F ) && ( c <= 0x0060 ) ) {      // basic latin punctuation
+        } else if ((c >= 0x005F) && (c <= 0x0060)) {      // basic latin punctuation
             return true;
-        } else if ( ( c >= 0x007E ) && ( c <= 0x007E ) ) {      // basic latin punctuation
+        } else if ((c >= 0x007E) && (c <= 0x007E)) {      // basic latin punctuation
             return true;
-        } else if ( ( c >= 0x007E ) && ( c <= 0x007E ) ) {      // basic latin punctuation
+        } else if ((c >= 0x007E) && (c <= 0x007E)) {      // basic latin punctuation
             return true;
-        } else if ( ( c >= 0x00A1 ) && ( c <= 0x00BF ) ) {      // latin supplement punctuation
+        } else if ((c >= 0x00A1) && (c <= 0x00BF)) {      // latin supplement punctuation
             return true;
-        } else if ( ( c >= 0x00D7 ) && ( c <= 0x00D7 ) ) {      // latin supplement punctuation
+        } else if ((c >= 0x00D7) && (c <= 0x00D7)) {      // latin supplement punctuation
             return true;
-        } else if ( ( c >= 0x00F7 ) && ( c <= 0x00F7 ) ) {      // latin supplement punctuation
+        } else if ((c >= 0x00F7) && (c <= 0x00F7)) {      // latin supplement punctuation
             return true;
-        } else if ( ( c >= 0x2000 ) && ( c <= 0x206F ) ) {      // general punctuation
+        } else if ((c >= 0x2000) && (c <= 0x206F)) {      // general punctuation
             return true;
         } else {                                                // [TBD] - not complete
             return false;
@@ -172,8 +172,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character is a digit
      */
-    public static boolean isDigit ( int c ) {
-        if ( ( c >= 0x0030 ) && ( c <= 0x0039 ) ) {             // basic latin digits
+    public static boolean isDigit (int c) {
+        if ((c >= 0x0030) && (c <= 0x0039)) {             // basic latin digits
             return true;
         } else {                                                // [TBD] - not complete
             return false;
@@ -185,10 +185,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to hebrew script
      */
-    public static boolean isHebrew ( int c ) {
-        if ( ( c >= 0x0590 ) && ( c <= 0x05FF ) ) {             // hebrew block
+    public static boolean isHebrew (int c) {
+        if ((c >= 0x0590) && (c <= 0x05FF)) {             // hebrew block
             return true;
-        } else if ( ( c >= 0xFB00 ) && ( c <= 0xFB4F ) ) {      // hebrew presentation forms block
+        } else if ((c >= 0xFB00) && (c <= 0xFB4F)) {      // hebrew presentation forms block
             return true;
         } else {
             return false;
@@ -200,8 +200,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to mongolian script
      */
-    public static boolean isMongolian ( int c ) {
-        if ( ( c >= 0x1800 ) && ( c <= 0x18AF ) ) {             // mongolian block
+    public static boolean isMongolian (int c) {
+        if ((c >= 0x1800) && (c <= 0x18AF)) {             // mongolian block
             return true;
         } else {
             return false;
@@ -213,14 +213,14 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to arabic script
      */
-    public static boolean isArabic ( int c ) {
-        if ( ( c >= 0x0600 ) && ( c <= 0x06FF ) ) {             // arabic block
+    public static boolean isArabic (int c) {
+        if ((c >= 0x0600) && (c <= 0x06FF)) {             // arabic block
             return true;
-        } else if ( ( c >= 0x0750 ) && ( c <= 0x077F ) ) {      // arabic supplement block
+        } else if ((c >= 0x0750) && (c <= 0x077F)) {      // arabic supplement block
             return true;
-        } else if ( ( c >= 0xFB50 ) && ( c <= 0xFDFF ) ) {      // arabic presentation forms a block
+        } else if ((c >= 0xFB50) && (c <= 0xFDFF)) {      // arabic presentation forms a block
             return true;
-        } else if ( ( c >= 0xFE70 ) && ( c <= 0xFEFF ) ) {      // arabic presentation forms b block
+        } else if ((c >= 0xFE70) && (c <= 0xFEFF)) {      // arabic presentation forms b block
             return true;
         } else {
             return false;
@@ -232,10 +232,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to greek script
      */
-    public static boolean isGreek ( int c ) {
-        if ( ( c >= 0x0370 ) && ( c <= 0x03FF ) ) {             // greek (and coptic) block
+    public static boolean isGreek (int c) {
+        if ((c >= 0x0370) && (c <= 0x03FF)) {             // greek (and coptic) block
             return true;
-        } else if ( ( c >= 0x1F00 ) && ( c <= 0x1FFF ) ) {      // greek extended block
+        } else if ((c >= 0x1F00) && (c <= 0x1FFF)) {      // greek extended block
             return true;
         } else {
             return false;
@@ -247,30 +247,30 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to latin script
      */
-    public static boolean isLatin ( int c ) {
-        if ( ( c >= 0x0041 ) && ( c <= 0x005A ) ) {             // basic latin upper case
+    public static boolean isLatin (int c) {
+        if ((c >= 0x0041) && (c <= 0x005A)) {             // basic latin upper case
             return true;
-        } else if ( ( c >= 0x0061 ) && ( c <= 0x007A ) ) {      // basic latin lower case
+        } else if ((c >= 0x0061) && (c <= 0x007A)) {      // basic latin lower case
             return true;
-        } else if ( ( c >= 0x00C0 ) && ( c <= 0x00D6 ) ) {      // latin supplement upper case
+        } else if ((c >= 0x00C0) && (c <= 0x00D6)) {      // latin supplement upper case
             return true;
-        } else if ( ( c >= 0x00D8 ) && ( c <= 0x00DF ) ) {      // latin supplement upper case
+        } else if ((c >= 0x00D8) && (c <= 0x00DF)) {      // latin supplement upper case
             return true;
-        } else if ( ( c >= 0x00E0 ) && ( c <= 0x00F6 ) ) {      // latin supplement lower case
+        } else if ((c >= 0x00E0) && (c <= 0x00F6)) {      // latin supplement lower case
             return true;
-        } else if ( ( c >= 0x00F8 ) && ( c <= 0x00FF ) ) {      // latin supplement lower case
+        } else if ((c >= 0x00F8) && (c <= 0x00FF)) {      // latin supplement lower case
             return true;
-        } else if ( ( c >= 0x0100 ) && ( c <= 0x017F ) ) {      // latin extended a
+        } else if ((c >= 0x0100) && (c <= 0x017F)) {      // latin extended a
             return true;
-        } else if ( ( c >= 0x0180 ) && ( c <= 0x024F ) ) {      // latin extended b
+        } else if ((c >= 0x0180) && (c <= 0x024F)) {      // latin extended b
             return true;
-        } else if ( ( c >= 0x1E00 ) && ( c <= 0x1EFF ) ) {      // latin extended additional
+        } else if ((c >= 0x1E00) && (c <= 0x1EFF)) {      // latin extended additional
             return true;
-        } else if ( ( c >= 0x2C60 ) && ( c <= 0x2C7F ) ) {      // latin extended c
+        } else if ((c >= 0x2C60) && (c <= 0x2C7F)) {      // latin extended c
             return true;
-        } else if ( ( c >= 0xA720 ) && ( c <= 0xA7FF ) ) {      // latin extended d
+        } else if ((c >= 0xA720) && (c <= 0xA7FF)) {      // latin extended d
             return true;
-        } else if ( ( c >= 0xFB00 ) && ( c <= 0xFB0F ) ) {      // latin ligatures
+        } else if ((c >= 0xFB00) && (c <= 0xFB0F)) {      // latin ligatures
             return true;
         } else {
             return false;
@@ -282,14 +282,14 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to cyrillic script
      */
-    public static boolean isCyrillic ( int c ) {
-        if ( ( c >= 0x0400 ) && ( c <= 0x04FF ) ) {             // cyrillic block
+    public static boolean isCyrillic (int c) {
+        if ((c >= 0x0400) && (c <= 0x04FF)) {             // cyrillic block
             return true;
-        } else if ( ( c >= 0x0500 ) && ( c <= 0x052F ) ) {      // cyrillic supplement block
+        } else if ((c >= 0x0500) && (c <= 0x052F)) {      // cyrillic supplement block
             return true;
-        } else if ( ( c >= 0x2DE0 ) && ( c <= 0x2DFF ) ) {      // cyrillic extended-a block
+        } else if ((c >= 0x2DE0) && (c <= 0x2DFF)) {      // cyrillic extended-a block
             return true;
-        } else if ( ( c >= 0xA640 ) && ( c <= 0xA69F ) ) {      // cyrillic extended-b block
+        } else if ((c >= 0xA640) && (c <= 0xA69F)) {      // cyrillic extended-b block
             return true;
         } else {
             return false;
@@ -301,10 +301,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to georgian script
      */
-    public static boolean isGeorgian ( int c ) {
-        if ( ( c >= 0x10A0 ) && ( c <= 0x10FF ) ) {             // georgian block
+    public static boolean isGeorgian (int c) {
+        if ((c >= 0x10A0) && (c <= 0x10FF)) {             // georgian block
             return true;
-        } else if ( ( c >= 0x2D00 ) && ( c <= 0x2D2F ) ) {      // georgian supplement block
+        } else if ((c >= 0x2D00) && (c <= 0x2D2F)) {      // georgian supplement block
             return true;
         } else {
             return false;
@@ -316,16 +316,16 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to hangul script
      */
-    public static boolean isHangul ( int c ) {
-        if ( ( c >= 0x1100 ) && ( c <= 0x11FF ) ) {             // hangul jamo
+    public static boolean isHangul (int c) {
+        if ((c >= 0x1100) && (c <= 0x11FF)) {             // hangul jamo
             return true;
-        } else if ( ( c >= 0x3130 ) && ( c <= 0x318F ) ) {      // hangul compatibility jamo
+        } else if ((c >= 0x3130) && (c <= 0x318F)) {      // hangul compatibility jamo
             return true;
-        } else if ( ( c >= 0xA960 ) && ( c <= 0xA97F ) ) {      // hangul jamo extended a
+        } else if ((c >= 0xA960) && (c <= 0xA97F)) {      // hangul jamo extended a
             return true;
-        } else if ( ( c >= 0xAC00 ) && ( c <= 0xD7A3 ) ) {      // hangul syllables
+        } else if ((c >= 0xAC00) && (c <= 0xD7A3)) {      // hangul syllables
             return true;
-        } else if ( ( c >= 0xD7B0 ) && ( c <= 0xD7FF ) ) {      // hangul jamo extended a
+        } else if ((c >= 0xD7B0) && (c <= 0xD7FF)) {      // hangul jamo extended a
             return true;
         } else {
             return false;
@@ -337,8 +337,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to gurmukhi script
      */
-    public static boolean isGurmukhi ( int c ) {
-        if ( ( c >= 0x0A00 ) && ( c <= 0x0A7F ) ) {             // gurmukhi block
+    public static boolean isGurmukhi (int c) {
+        if ((c >= 0x0A00) && (c <= 0x0A7F)) {             // gurmukhi block
             return true;
         } else {
             return false;
@@ -350,10 +350,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to devanagari script
      */
-    public static boolean isDevanagari ( int c ) {
-        if ( ( c >= 0x0900 ) && ( c <= 0x097F ) ) {             // devangari block
+    public static boolean isDevanagari (int c) {
+        if ((c >= 0x0900) && (c <= 0x097F)) {             // devangari block
             return true;
-        } else if ( ( c >= 0xA8E0 ) && ( c <= 0xA8FF ) ) {      // devangari extended block
+        } else if ((c >= 0xA8E0) && (c <= 0xA8FF)) {      // devangari extended block
             return true;
         } else {
             return false;
@@ -365,8 +365,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to gujarati script
      */
-    public static boolean isGujarati ( int c ) {
-        if ( ( c >= 0x0A80 ) && ( c <= 0x0AFF ) ) {             // gujarati block
+    public static boolean isGujarati (int c) {
+        if ((c >= 0x0A80) && (c <= 0x0AFF)) {             // gujarati block
             return true;
         } else {
             return false;
@@ -378,8 +378,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to bengali script
      */
-    public static boolean isBengali ( int c ) {
-        if ( ( c >= 0x0980 ) && ( c <= 0x09FF ) ) {             // bengali block
+    public static boolean isBengali (int c) {
+        if ((c >= 0x0980) && (c <= 0x09FF)) {             // bengali block
             return true;
         } else {
             return false;
@@ -391,8 +391,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to oriya script
      */
-    public static boolean isOriya ( int c ) {
-        if ( ( c >= 0x0B00 ) && ( c <= 0x0B7F ) ) {             // oriya block
+    public static boolean isOriya (int c) {
+        if ((c >= 0x0B00) && (c <= 0x0B7F)) {             // oriya block
             return true;
         } else {
             return false;
@@ -404,8 +404,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to tibetan script
      */
-    public static boolean isTibetan ( int c ) {
-        if ( ( c >= 0x0F00 ) && ( c <= 0x0FFF ) ) {             // tibetan block
+    public static boolean isTibetan (int c) {
+        if ((c >= 0x0F00) && (c <= 0x0FFF)) {             // tibetan block
             return true;
         } else {
             return false;
@@ -417,8 +417,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to telugu script
      */
-    public static boolean isTelugu ( int c ) {
-        if ( ( c >= 0x0C00 ) && ( c <= 0x0C7F ) ) {             // telugu block
+    public static boolean isTelugu (int c) {
+        if ((c >= 0x0C00) && (c <= 0x0C7F)) {             // telugu block
             return true;
         } else {
             return false;
@@ -430,8 +430,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to kannada script
      */
-    public static boolean isKannada ( int c ) {
-        if ( ( c >= 0x0C00 ) && ( c <= 0x0C7F ) ) {             // kannada block
+    public static boolean isKannada (int c) {
+        if ((c >= 0x0C00) && (c <= 0x0C7F)) {             // kannada block
             return true;
         } else {
             return false;
@@ -443,8 +443,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to tamil script
      */
-    public static boolean isTamil ( int c ) {
-        if ( ( c >= 0x0B80 ) && ( c <= 0x0BFF ) ) {             // tamil block
+    public static boolean isTamil (int c) {
+        if ((c >= 0x0B80) && (c <= 0x0BFF)) {             // tamil block
             return true;
         } else {
             return false;
@@ -456,8 +456,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to malayalam script
      */
-    public static boolean isMalayalam ( int c ) {
-        if ( ( c >= 0x0D00 ) && ( c <= 0x0D7F ) ) {             // malayalam block
+    public static boolean isMalayalam (int c) {
+        if ((c >= 0x0D00) && (c <= 0x0D7F)) {             // malayalam block
             return true;
         } else {
             return false;
@@ -469,8 +469,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to sinhalese script
      */
-    public static boolean isSinhalese ( int c ) {
-        if ( ( c >= 0x0D80 ) && ( c <= 0x0DFF ) ) {             // sinhala block
+    public static boolean isSinhalese (int c) {
+        if ((c >= 0x0D80) && (c <= 0x0DFF)) {             // sinhala block
             return true;
         } else {
             return false;
@@ -482,10 +482,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to burmese script
      */
-    public static boolean isBurmese ( int c ) {
-        if ( ( c >= 0x1000 ) && ( c <= 0x109F ) ) {             // burmese (myanmar) block
+    public static boolean isBurmese (int c) {
+        if ((c >= 0x1000) && (c <= 0x109F)) {             // burmese (myanmar) block
             return true;
-        } else if ( ( c >= 0xAA60 ) && ( c <= 0xAA7F ) ) {      // burmese (myanmar) extended block
+        } else if ((c >= 0xAA60) && (c <= 0xAA7F)) {      // burmese (myanmar) extended block
             return true;
         } else {
             return false;
@@ -497,8 +497,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to thai script
      */
-    public static boolean isThai ( int c ) {
-        if ( ( c >= 0x0E00 ) && ( c <= 0x0E7F ) ) {             // thai block
+    public static boolean isThai (int c) {
+        if ((c >= 0x0E00) && (c <= 0x0E7F)) {             // thai block
             return true;
         } else {
             return false;
@@ -510,10 +510,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to khmer script
      */
-    public static boolean isKhmer ( int c ) {
-        if ( ( c >= 0x1780 ) && ( c <= 0x17FF ) ) {             // khmer block
+    public static boolean isKhmer (int c) {
+        if ((c >= 0x1780) && (c <= 0x17FF)) {             // khmer block
             return true;
-        } else if ( ( c >= 0x19E0 ) && ( c <= 0x19FF ) ) {      // khmer symbols block
+        } else if ((c >= 0x19E0) && (c <= 0x19FF)) {      // khmer symbols block
             return true;
         } else {
             return false;
@@ -525,8 +525,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to lao script
      */
-    public static boolean isLao ( int c ) {
-        if ( ( c >= 0x0E80 ) && ( c <= 0x0EFF ) ) {             // lao block
+    public static boolean isLao (int c) {
+        if ((c >= 0x0E80) && (c <= 0x0EFF)) {             // lao block
             return true;
         } else {
             return false;
@@ -538,14 +538,14 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to ethiopic (amharic) script
      */
-    public static boolean isEthiopic ( int c ) {
-        if ( ( c >= 0x1200 ) && ( c <= 0x137F ) ) {             // ethiopic block
+    public static boolean isEthiopic (int c) {
+        if ((c >= 0x1200) && (c <= 0x137F)) {             // ethiopic block
             return true;
-        } else if ( ( c >= 0x1380 ) && ( c <= 0x139F ) ) {      // ethoipic supplement block
+        } else if ((c >= 0x1380) && (c <= 0x139F)) {      // ethoipic supplement block
             return true;
-        } else if ( ( c >= 0x2D80 ) && ( c <= 0x2DDF ) ) {      // ethoipic extended block
+        } else if ((c >= 0x2D80) && (c <= 0x2DDF)) {      // ethoipic extended block
             return true;
-        } else if ( ( c >= 0xAB00 ) && ( c <= 0xAB2F ) ) {      // ethoipic extended-a block
+        } else if ((c >= 0xAB00) && (c <= 0xAB2F)) {      // ethoipic extended-a block
             return true;
         } else {
             return false;
@@ -557,18 +557,18 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to han (unified cjk) script
      */
-    public static boolean isHan ( int c ) {
-        if ( ( c >= 0x3400 ) && ( c <= 0x4DBF ) ) {
+    public static boolean isHan (int c) {
+        if ((c >= 0x3400) && (c <= 0x4DBF)) {
             return true; // cjk unified ideographs extension a
-        } else if ( ( c >= 0x4E00 ) && ( c <= 0x9FFF ) ) {
+        } else if ((c >= 0x4E00) && (c <= 0x9FFF)) {
             return true; // cjk unified ideographs
-        } else if ( ( c >= 0xF900 ) && ( c <= 0xFAFF ) ) {
+        } else if ((c >= 0xF900) && (c <= 0xFAFF)) {
             return true; // cjk compatibility ideographs
-        } else if ( ( c >= 0x20000 ) && ( c <= 0x2A6DF ) ) {
+        } else if ((c >= 0x20000) && (c <= 0x2A6DF)) {
             return true; // cjk unified ideographs extension b
-        } else if ( ( c >= 0x2A700 ) && ( c <= 0x2B73F ) ) {
+        } else if ((c >= 0x2A700) && (c <= 0x2B73F)) {
             return true; // cjk unified ideographs extension c
-        } else if ( ( c >= 0x2F800 ) && ( c <= 0x2FA1F ) ) {
+        } else if ((c >= 0x2F800) && (c <= 0x2FA1F)) {
             return true; // cjk compatibility ideographs supplement
         } else {
             return false;
@@ -580,8 +580,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to bopomofo script
      */
-    public static boolean isBopomofo ( int c ) {
-        if ( ( c >= 0x3100 ) && ( c <= 0x312F ) ) {
+    public static boolean isBopomofo (int c) {
+        if ((c >= 0x3100) && (c <= 0x312F)) {
             return true;
         } else {
             return false;
@@ -593,8 +593,8 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to hiragana script
      */
-    public static boolean isHiragana ( int c ) {
-        if ( ( c >= 0x3040 ) && ( c <= 0x309F ) ) {
+    public static boolean isHiragana (int c) {
+        if ((c >= 0x3040) && (c <= 0x309F)) {
             return true;
         } else {
             return false;
@@ -606,10 +606,10 @@ public final class CharScript {
      * @param c a character represented as a unicode scalar value
      * @return true if character belongs to katakana script
      */
-    public static boolean isKatakana ( int c ) {
-        if ( ( c >= 0x30A0 ) && ( c <= 0x30FF ) ) {
+    public static boolean isKatakana (int c) {
+        if ((c >= 0x30A0) && (c <= 0x30FF)) {
             return true;
-        } else if ( ( c >= 0x31F0 ) && ( c <= 0x31FF ) ) {
+        } else if ((c >= 0x31F0) && (c <= 0x31FF)) {
             return true;
         } else {
             return false;
@@ -622,68 +622,68 @@ public final class CharScript {
      * @param c the character to obtain script
      * @return an ISO15924 script code
      */
-    public static int scriptOf ( int c ) { // [TBD] - needs optimization!!!
-        if ( CharUtilities.isAnySpace ( c ) ) {
+    public static int scriptOf (int c) { // [TBD] - needs optimization!!!
+        if (CharUtilities.isAnySpace (c)) {
             return SCRIPT_UNDETERMINED;
-        } else if ( isPunctuation ( c ) ) {
+        } else if (isPunctuation (c)) {
             return SCRIPT_UNDETERMINED;
-        } else if ( isDigit ( c ) ) {
+        } else if (isDigit (c)) {
             return SCRIPT_UNDETERMINED;
-        } else if ( isLatin ( c ) ) {
+        } else if (isLatin (c)) {
             return SCRIPT_LATIN;
-        } else if ( isCyrillic ( c ) ) {
+        } else if (isCyrillic (c)) {
             return SCRIPT_CYRILLIC;
-        } else if ( isGreek ( c ) ) {
+        } else if (isGreek (c)) {
             return SCRIPT_GREEK;
-        } else if ( isHan ( c ) ) {
+        } else if (isHan (c)) {
             return SCRIPT_HAN;
-        } else if ( isBopomofo ( c ) ) {
+        } else if (isBopomofo (c)) {
             return SCRIPT_BOPOMOFO;
-        } else if ( isKatakana ( c ) ) {
+        } else if (isKatakana (c)) {
             return SCRIPT_KATAKANA;
-        } else if ( isHiragana ( c ) ) {
+        } else if (isHiragana (c)) {
             return SCRIPT_HIRAGANA;
-        } else if ( isHangul ( c ) ) {
+        } else if (isHangul (c)) {
             return SCRIPT_HANGUL;
-        } else if ( isArabic ( c ) ) {
+        } else if (isArabic (c)) {
             return SCRIPT_ARABIC;
-        } else if ( isHebrew ( c ) ) {
+        } else if (isHebrew (c)) {
             return SCRIPT_HEBREW;
-        } else if ( isMongolian ( c ) ) {
+        } else if (isMongolian (c)) {
             return SCRIPT_MONGOLIAN;
-        } else if ( isGeorgian ( c ) ) {
+        } else if (isGeorgian (c)) {
             return SCRIPT_GEORGIAN;
-        } else if ( isGurmukhi ( c ) ) {
-            return useV2IndicRules ( SCRIPT_GURMUKHI );
-        } else if ( isDevanagari ( c ) ) {
-            return useV2IndicRules ( SCRIPT_DEVANAGARI );
-        } else if ( isGujarati ( c ) ) {
-            return useV2IndicRules ( SCRIPT_GUJARATI );
-        } else if ( isBengali ( c ) ) {
-            return useV2IndicRules ( SCRIPT_BENGALI );
-        } else if ( isOriya ( c ) ) {
-            return useV2IndicRules ( SCRIPT_ORIYA );
-        } else if ( isTibetan ( c ) ) {
+        } else if (isGurmukhi (c)) {
+            return useV2IndicRules (SCRIPT_GURMUKHI);
+        } else if (isDevanagari (c)) {
+            return useV2IndicRules (SCRIPT_DEVANAGARI);
+        } else if (isGujarati (c)) {
+            return useV2IndicRules (SCRIPT_GUJARATI);
+        } else if (isBengali (c)) {
+            return useV2IndicRules (SCRIPT_BENGALI);
+        } else if (isOriya (c)) {
+            return useV2IndicRules (SCRIPT_ORIYA);
+        } else if (isTibetan (c)) {
             return SCRIPT_TIBETAN;
-        } else if ( isTelugu ( c ) ) {
-            return useV2IndicRules ( SCRIPT_TELUGU );
-        } else if ( isKannada ( c ) ) {
-            return useV2IndicRules ( SCRIPT_KANNADA );
-        } else if ( isTamil ( c ) ) {
-            return useV2IndicRules ( SCRIPT_TAMIL );
-        } else if ( isMalayalam ( c ) ) {
-            return useV2IndicRules ( SCRIPT_MALAYALAM );
-        } else if ( isSinhalese ( c ) ) {
+        } else if (isTelugu (c)) {
+            return useV2IndicRules (SCRIPT_TELUGU);
+        } else if (isKannada (c)) {
+            return useV2IndicRules (SCRIPT_KANNADA);
+        } else if (isTamil (c)) {
+            return useV2IndicRules (SCRIPT_TAMIL);
+        } else if (isMalayalam (c)) {
+            return useV2IndicRules (SCRIPT_MALAYALAM);
+        } else if (isSinhalese (c)) {
             return SCRIPT_SINHALESE;
-        } else if ( isBurmese ( c ) ) {
+        } else if (isBurmese (c)) {
             return SCRIPT_BURMESE;
-        } else if ( isThai ( c ) ) {
+        } else if (isThai (c)) {
             return SCRIPT_THAI;
-        } else if ( isKhmer ( c ) ) {
+        } else if (isKhmer (c)) {
             return SCRIPT_KHMER;
-        } else if ( isLao ( c ) ) {
+        } else if (isLao (c)) {
             return SCRIPT_LAO;
-        } else if ( isEthiopic ( c ) ) {
+        } else if (isEthiopic (c)) {
             return SCRIPT_ETHIOPIC;
         } else {
             return SCRIPT_UNDETERMINED;
@@ -696,9 +696,9 @@ public final class CharScript {
      * @param sc a V1 indic script code
      * @return either SC or the V2 flavor of SC if V2 indic rules apply
      */
-    public static int useV2IndicRules ( int sc ) {
-        if ( useV2Indic ) {
-            return ( sc < 1000 ) ? ( sc + 1000 ) : sc;
+    public static int useV2IndicRules (int sc) {
+        if (useV2Indic) {
+            return (sc < 1000) ? (sc + 1000) : sc;
         } else {
             return sc;
         }
@@ -711,17 +711,17 @@ public final class CharScript {
      * @param cs the character sequence
      * @return a (possibly empty) array of script codes
      */
-    public static int[] scriptsOf ( CharSequence cs ) {
+    public static int[] scriptsOf (CharSequence cs) {
         Set s = new HashSet();
-        for ( int i = 0, n = cs.length(); i < n; i++ ) {
-            s.add ( Integer.valueOf ( scriptOf ( cs.charAt ( i ) ) ) );
+        for (int i = 0, n = cs.length(); i < n; i++) {
+            s.add (Integer.valueOf (scriptOf (cs.charAt (i))));
         }
         int[] sa = new int [ s.size() ];
         int ns = 0;
-        for ( Iterator it = s.iterator(); it.hasNext();) {
-            sa [ ns++ ] = ( (Integer) it.next() ) .intValue();
+        for (Iterator it = s.iterator(); it.hasNext();) {
+            sa [ ns++ ] = ((Integer) it.next()) .intValue();
         }
-        Arrays.sort ( sa );
+        Arrays.sort (sa);
         return sa;
     }
 
@@ -730,26 +730,26 @@ public final class CharScript {
      * @param cs the character sequence
      * @return the dominant script or SCRIPT_UNDETERMINED
      */
-    public static int dominantScript ( CharSequence cs ) {
+    public static int dominantScript (CharSequence cs) {
         Map m = new HashMap();
-        for ( int i = 0, n = cs.length(); i < n; i++ ) {
-            int c = cs.charAt ( i );
-            int s = scriptOf ( c );
-            Integer k = Integer.valueOf ( s );
-            Integer v = (Integer) m.get ( k );
-            if ( v != null ) {
-                m.put ( k, Integer.valueOf ( v.intValue() + 1 ) );
+        for (int i = 0, n = cs.length(); i < n; i++) {
+            int c = cs.charAt (i);
+            int s = scriptOf (c);
+            Integer k = Integer.valueOf (s);
+            Integer v = (Integer) m.get (k);
+            if (v != null) {
+                m.put (k, Integer.valueOf (v.intValue() + 1));
             } else {
-                m.put ( k, Integer.valueOf ( 0 ) );
+                m.put (k, Integer.valueOf (0));
             }
         }
         int sMax = -1;
         int cMax = -1;
-        for ( Iterator it = m.entrySet().iterator(); it.hasNext();) {
+        for (Iterator it = m.entrySet().iterator(); it.hasNext();) {
             Map.Entry e = (Map.Entry) it.next();
             Integer k = (Integer) e.getKey();
             int s = k.intValue();
-            switch ( s ) {
+            switch (s) {
             case SCRIPT_UNDETERMINED:
             case SCRIPT_UNCODED:
                 break;
@@ -758,7 +758,7 @@ public final class CharScript {
                     Integer v = (Integer) e.getValue();
                     assert v != null;
                     int c = v.intValue();
-                    if ( c > cMax ) {
+                    if (c > cMax) {
                         cMax = c;
                         sMax = s;
                     }
@@ -766,7 +766,7 @@ public final class CharScript {
                 }
             }
         }
-        if ( sMax < 0 ) {
+        if (sMax < 0) {
             sMax = SCRIPT_UNDETERMINED;
         }
         return sMax;
@@ -779,8 +779,8 @@ public final class CharScript {
      * @param script a script tag
      * @return true if script tag is a designated 'Indic' script
      */
-    public static boolean isIndicScript ( String script ) {
-        return isIndicScript ( scriptCodeFromTag ( script ) );
+    public static boolean isIndicScript (String script) {
+        return isIndicScript (scriptCodeFromTag (script));
     }
 
     /**
@@ -790,8 +790,8 @@ public final class CharScript {
      * @param script a script code
      * @return true if script code is a designated 'Indic' script
      */
-    public static boolean isIndicScript ( int script ) {
-        switch ( script ) {
+    public static boolean isIndicScript (int script) {
+        switch (script) {
         case SCRIPT_BENGALI:
         case SCRIPT_BENGALI_2:
         case SCRIPT_BURMESE:
@@ -822,11 +822,11 @@ public final class CharScript {
      * @param code the script code
      * @return a  script tag
      */
-    public static String scriptTagFromCode ( int code ) {
+    public static String scriptTagFromCode (int code) {
         Map<Integer,String> m = getScriptTagsMap();
-        if ( m != null ) {
+        if (m != null) {
             String tag;
-            if ( ( tag = m.get ( Integer.valueOf ( code ) ) ) != null ) {
+            if ((tag = m.get (Integer.valueOf (code))) != null) {
                 return tag;
             } else {
                 return "";
@@ -841,11 +841,11 @@ public final class CharScript {
      * @param tag the script tag
      * @return a script code
      */
-    public static int scriptCodeFromTag ( String tag ) {
+    public static int scriptCodeFromTag (String tag) {
         Map<String,Integer> m = getScriptCodeMap();
-        if ( m != null ) {
+        if (m != null) {
             Integer c;
-            if ( ( c = m.get ( tag ) ) != null ) {
+            if ((c = m.get (tag)) != null) {
                 return (int) c;
             } else {
                 return SCRIPT_UNDETERMINED;
@@ -858,72 +858,72 @@ public final class CharScript {
     private static Map<Integer,String> scriptTagsMap = null;
     private static Map<String,Integer> scriptCodeMap = null;
 
-    private static void putScriptTag ( Map tm, Map cm, int code, String tag ) {
+    private static void putScriptTag (Map tm, Map cm, int code, String tag) {
         assert tag != null;
         assert tag.length() != 0;
         assert code >= 0;
         assert code <  2000;
-        tm.put ( Integer.valueOf ( code ), tag );
-        cm.put ( tag, Integer.valueOf ( code ) );
+        tm.put (Integer.valueOf (code), tag);
+        cm.put (tag, Integer.valueOf (code));
     }
 
     private static void makeScriptMaps() {
         HashMap<Integer,String> tm = new HashMap<Integer,String>();
         HashMap<String,Integer> cm = new HashMap<String,Integer>();
-        putScriptTag ( tm, cm, SCRIPT_HEBREW, "hebr" );
-        putScriptTag ( tm, cm, SCRIPT_MONGOLIAN, "mong" );
-        putScriptTag ( tm, cm, SCRIPT_ARABIC, "arab" );
-        putScriptTag ( tm, cm, SCRIPT_GREEK, "grek" );
-        putScriptTag ( tm, cm, SCRIPT_LATIN, "latn" );
-        putScriptTag ( tm, cm, SCRIPT_CYRILLIC, "cyrl" );
-        putScriptTag ( tm, cm, SCRIPT_GEORGIAN, "geor" );
-        putScriptTag ( tm, cm, SCRIPT_BOPOMOFO, "bopo" );
-        putScriptTag ( tm, cm, SCRIPT_HANGUL, "hang" );
-        putScriptTag ( tm, cm, SCRIPT_GURMUKHI, "guru" );
-        putScriptTag ( tm, cm, SCRIPT_GURMUKHI_2, "gur2" );
-        putScriptTag ( tm, cm, SCRIPT_DEVANAGARI, "deva" );
-        putScriptTag ( tm, cm, SCRIPT_DEVANAGARI_2, "dev2" );
-        putScriptTag ( tm, cm, SCRIPT_GUJARATI, "gujr" );
-        putScriptTag ( tm, cm, SCRIPT_GUJARATI_2, "gjr2" );
-        putScriptTag ( tm, cm, SCRIPT_BENGALI, "beng" );
-        putScriptTag ( tm, cm, SCRIPT_BENGALI_2, "bng2" );
-        putScriptTag ( tm, cm, SCRIPT_ORIYA, "orya" );
-        putScriptTag ( tm, cm, SCRIPT_ORIYA_2, "ory2" );
-        putScriptTag ( tm, cm, SCRIPT_TIBETAN, "tibt" );
-        putScriptTag ( tm, cm, SCRIPT_TELUGU, "telu" );
-        putScriptTag ( tm, cm, SCRIPT_TELUGU_2, "tel2" );
-        putScriptTag ( tm, cm, SCRIPT_KANNADA, "knda" );
-        putScriptTag ( tm, cm, SCRIPT_KANNADA_2, "knd2" );
-        putScriptTag ( tm, cm, SCRIPT_TAMIL, "taml" );
-        putScriptTag ( tm, cm, SCRIPT_TAMIL_2, "tml2" );
-        putScriptTag ( tm, cm, SCRIPT_MALAYALAM, "mlym" );
-        putScriptTag ( tm, cm, SCRIPT_MALAYALAM_2, "mlm2" );
-        putScriptTag ( tm, cm, SCRIPT_SINHALESE, "sinh" );
-        putScriptTag ( tm, cm, SCRIPT_BURMESE, "mymr" );
-        putScriptTag ( tm, cm, SCRIPT_THAI, "thai" );
-        putScriptTag ( tm, cm, SCRIPT_KHMER, "khmr" );
-        putScriptTag ( tm, cm, SCRIPT_LAO, "laoo" );
-        putScriptTag ( tm, cm, SCRIPT_HIRAGANA, "hira" );
-        putScriptTag ( tm, cm, SCRIPT_ETHIOPIC, "ethi" );
-        putScriptTag ( tm, cm, SCRIPT_HAN, "hani" );
-        putScriptTag ( tm, cm, SCRIPT_KATAKANA, "kana" );
-        putScriptTag ( tm, cm, SCRIPT_MATH, "zmth" );
-        putScriptTag ( tm, cm, SCRIPT_SYMBOL, "zsym" );
-        putScriptTag ( tm, cm, SCRIPT_UNDETERMINED, "zyyy" );
-        putScriptTag ( tm, cm, SCRIPT_UNCODED, "zzzz" );
+        putScriptTag (tm, cm, SCRIPT_HEBREW, "hebr");
+        putScriptTag (tm, cm, SCRIPT_MONGOLIAN, "mong");
+        putScriptTag (tm, cm, SCRIPT_ARABIC, "arab");
+        putScriptTag (tm, cm, SCRIPT_GREEK, "grek");
+        putScriptTag (tm, cm, SCRIPT_LATIN, "latn");
+        putScriptTag (tm, cm, SCRIPT_CYRILLIC, "cyrl");
+        putScriptTag (tm, cm, SCRIPT_GEORGIAN, "geor");
+        putScriptTag (tm, cm, SCRIPT_BOPOMOFO, "bopo");
+        putScriptTag (tm, cm, SCRIPT_HANGUL, "hang");
+        putScriptTag (tm, cm, SCRIPT_GURMUKHI, "guru");
+        putScriptTag (tm, cm, SCRIPT_GURMUKHI_2, "gur2");
+        putScriptTag (tm, cm, SCRIPT_DEVANAGARI, "deva");
+        putScriptTag (tm, cm, SCRIPT_DEVANAGARI_2, "dev2");
+        putScriptTag (tm, cm, SCRIPT_GUJARATI, "gujr");
+        putScriptTag (tm, cm, SCRIPT_GUJARATI_2, "gjr2");
+        putScriptTag (tm, cm, SCRIPT_BENGALI, "beng");
+        putScriptTag (tm, cm, SCRIPT_BENGALI_2, "bng2");
+        putScriptTag (tm, cm, SCRIPT_ORIYA, "orya");
+        putScriptTag (tm, cm, SCRIPT_ORIYA_2, "ory2");
+        putScriptTag (tm, cm, SCRIPT_TIBETAN, "tibt");
+        putScriptTag (tm, cm, SCRIPT_TELUGU, "telu");
+        putScriptTag (tm, cm, SCRIPT_TELUGU_2, "tel2");
+        putScriptTag (tm, cm, SCRIPT_KANNADA, "knda");
+        putScriptTag (tm, cm, SCRIPT_KANNADA_2, "knd2");
+        putScriptTag (tm, cm, SCRIPT_TAMIL, "taml");
+        putScriptTag (tm, cm, SCRIPT_TAMIL_2, "tml2");
+        putScriptTag (tm, cm, SCRIPT_MALAYALAM, "mlym");
+        putScriptTag (tm, cm, SCRIPT_MALAYALAM_2, "mlm2");
+        putScriptTag (tm, cm, SCRIPT_SINHALESE, "sinh");
+        putScriptTag (tm, cm, SCRIPT_BURMESE, "mymr");
+        putScriptTag (tm, cm, SCRIPT_THAI, "thai");
+        putScriptTag (tm, cm, SCRIPT_KHMER, "khmr");
+        putScriptTag (tm, cm, SCRIPT_LAO, "laoo");
+        putScriptTag (tm, cm, SCRIPT_HIRAGANA, "hira");
+        putScriptTag (tm, cm, SCRIPT_ETHIOPIC, "ethi");
+        putScriptTag (tm, cm, SCRIPT_HAN, "hani");
+        putScriptTag (tm, cm, SCRIPT_KATAKANA, "kana");
+        putScriptTag (tm, cm, SCRIPT_MATH, "zmth");
+        putScriptTag (tm, cm, SCRIPT_SYMBOL, "zsym");
+        putScriptTag (tm, cm, SCRIPT_UNDETERMINED, "zyyy");
+        putScriptTag (tm, cm, SCRIPT_UNCODED, "zzzz");
         scriptTagsMap = tm;
         scriptCodeMap = cm;
     }
 
     private static Map<Integer,String> getScriptTagsMap() {
-        if ( scriptTagsMap == null ) {
+        if (scriptTagsMap == null) {
             makeScriptMaps();
         }
         return scriptTagsMap;
     }
 
     private static Map<String,Integer> getScriptCodeMap() {
-        if ( scriptCodeMap == null ) {
+        if (scriptCodeMap == null) {
             makeScriptMaps();
         }
         return scriptCodeMap;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphContextTester.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphContextTester.java?rev=1466146&r1=1466145&r2=1466146&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphContextTester.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphContextTester.java Tue Apr  9 17:31:41 2013
@@ -38,6 +38,6 @@ public interface GlyphContextTester {
      * @param flags that apply to lookup in scope
      * @return true if test is satisfied
      */
-    boolean test ( String script, String language, String feature, GlyphSequence gs, int index, int flags );
+    boolean test (String script, String language, String feature, GlyphSequence gs, int index, int flags);
 
 }



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