aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java')
-rw-r--r--src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java b/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
index 09a71db6a..5f49990ac 100644
--- a/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
+++ b/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
@@ -49,8 +49,8 @@ public class DefaultScriptProcessor extends ScriptProcessor {
"mkmk" // mark to mark positioning
};
- DefaultScriptProcessor ( String script ) {
- super ( script );
+ DefaultScriptProcessor (String script) {
+ super (script);
}
@Override
@@ -79,43 +79,43 @@ public class DefaultScriptProcessor extends ScriptProcessor {
@Override
/** {@inheritDoc} */
- 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) {
int ng = gs.getGlyphCount();
- int[] ga = gs.getGlyphArray ( false );
+ int[] ga = gs.getGlyphArray (false);
int nm = 0;
// count combining marks
- for ( int i = 0; i < ng; i++ ) {
+ for (int i = 0; i < ng; i++) {
int gid = ga [ i ];
- if ( gdef.isGlyphClass ( gid, GlyphDefinitionTable.GLYPH_CLASS_MARK ) ) {
+ if (gdef.isGlyphClass (gid, GlyphDefinitionTable.GLYPH_CLASS_MARK)) {
nm++;
}
}
// only reorder if there is at least one mark and at least one non-mark glyph
- if ( ( nm > 0 ) && ( ( ng - nm ) > 0 ) ) {
- GlyphSequence.CharAssociation[] aa = gs.getAssociations ( 0, -1 );
+ if ((nm > 0) && ((ng - nm) > 0)) {
+ GlyphSequence.CharAssociation[] aa = gs.getAssociations (0, -1);
int[] nga = new int [ ng ];
- int[][] npa = ( gpa != null ) ? new int [ ng ][] : null;
+ int[][] npa = (gpa != null) ? new int [ ng ][] : null;
GlyphSequence.CharAssociation[] naa = new GlyphSequence.CharAssociation [ ng ];
int k = 0;
GlyphSequence.CharAssociation ba = null;
int bg = -1;
int[] bpa = null;
- for ( int i = 0; i < ng; i++ ) {
+ for (int i = 0; i < ng; i++) {
int gid = ga [ i ];
- int[] pa = ( gpa != null ) ? gpa [ i ] : null;
+ int[] pa = (gpa != null) ? gpa [ i ] : null;
GlyphSequence.CharAssociation ca = aa [ i ];
- if ( gdef.isGlyphClass ( gid, GlyphDefinitionTable.GLYPH_CLASS_MARK ) ) {
+ if (gdef.isGlyphClass (gid, GlyphDefinitionTable.GLYPH_CLASS_MARK)) {
nga [ k ] = gid;
naa [ k ] = ca;
- if ( npa != null ) {
+ if (npa != null) {
npa [ k ] = pa;
}
k++;
} else {
- if ( bg != -1 ) {
+ if (bg != -1) {
nga [ k ] = bg;
naa [ k ] = ba;
- if ( npa != null ) {
+ if (npa != null) {
npa [ k ] = bpa;
}
k++;
@@ -123,26 +123,26 @@ public class DefaultScriptProcessor extends ScriptProcessor {
ba = null;
bpa = null;
}
- if ( bg == -1 ) {
+ if (bg == -1) {
bg = gid;
ba = ca;
bpa = pa;
}
}
}
- if ( bg != -1 ) {
+ if (bg != -1) {
nga [ k ] = bg;
naa [ k ] = ba;
- if ( npa != null ) {
+ if (npa != null) {
npa [ k ] = bpa;
}
k++;
}
assert k == ng;
- if ( npa != null ) {
- System.arraycopy ( npa, 0, gpa, 0, ng );
+ if (npa != null) {
+ System.arraycopy (npa, 0, gpa, 0, ng);
}
- return new GlyphSequence ( gs, null, nga, null, null, naa, null );
+ return new GlyphSequence (gs, null, nga, null, null, naa, null);
} else {
return gs;
}