assert data.size() > 0;
String script = null;
String language = null;
String tfn = null;
TTXFile tf = null;
GlyphSubstitutionTable gsub = null;
GlyphPositioningTable gpos = null;
int[] widths = null;
for ( Object[] d : data ) {
if ( script == null ) {
assert d.length >= 4;
script = (String) d[0];
language = (String) d[1];
tfn = (String) d[3];
tf = TTXFile.getFromCache ( ttxFontsDir + File.separator + tfn );
assertTrue ( tf != null );
gsub = tf.getGSUB();
assertTrue ( gsub != null );
gpos = tf.getGPOS();
assertTrue ( gpos != null );
widths = tf.getWidths();
assertTrue ( widths != null );
} else {
assert tf != null;
assert gsub != null;
assert gpos != null;
assert tfn != null;
assert d.length >= 4;
String wf = (String) d[0];
int[] iga = (int[]) d[1];
int[] oga = (int[]) d[2];
int[][] paa = (int[][]) d[3];
GlyphSequence tigs = tf.mapCharsToGlyphs ( wf );
assertSameGlyphs ( iga, getGlyphs ( tigs ), "input glyphs", wf, tfn );
GlyphSequence togs = gsub.substitute ( tigs, script, language );
assertSameGlyphs ( oga, getGlyphs ( togs ), "output glyphs", wf, tfn );
int[][] tpaa = new int [ togs.getGlyphCount() ] [ 4 ];
if ( gpos.position ( togs, script, language, 1000, widths, tpaa ) ) {
assertSameAdjustments ( paa, tpaa, wf, tfn );
} else if ( paa != null ) {