The GlyphDefinitionTable class is a glyph table that implements glyph definition functionality according to the OpenType GDEF table.
GlyphDefinitionTable
This work was originally authored by Glenn Adams (gadams@apache.org).
30963097309830993100310131023103310431053106
if ( td.length > 1 ) { String fid = (String) td[0]; String lid = (String) td[1]; TTXFile tf = findTTX ( fid ); assertTrue ( tf != null ); GlyphDefinitionTable gdef = tf.getGDEF(); assertTrue ( gdef != null ); String[][] tia = (String[][]) td[2]; switch ( (int) ( (Integer) tp[0] ) ) { case GlyphDefinitionTable.GDEF_LOOKUP_TYPE_GLYPH_CLASS: performGlyphClassLookups ( tf, lid, tia );
312031213122312331243125312631273128312931303131313231333134313531363137313831393140
} } } private void performGlyphClassLookups ( TTXFile tf, String lid, String[][] tia ) { GlyphDefinitionTable gdef = tf.getGDEF(); assert gdef != null; for ( String[] ti : tia ) { assert ti != null; assert ti.length > 1; String gn = ti[0]; assert gn != null; String cn = ti[1]; assert cn != null; int g = tf.getGlyph ( gn ); assertTrue ( g >= 0 ); int oc = Integer.parseInt ( cn ); int tc = gdef.getGlyphClass ( g ); assertEquals ( "bad glyph class for glyph \'" + gn + "\', gid(" + g + ")", oc, tc ); } }
23332334233523362337233823392340234123422343
features.put ( fid, extractFeature() ); nextFeature(); } } else if ( en[1].equals ( "GDEF" ) ) { if ( subtables.size() > 0 ) { gdef = new GlyphDefinitionTable ( subtables ); } clearTable(); } else if ( en[1].equals ( "GPOS" ) ) { if ( subtables.size() > 0 ) { gpos = new GlyphPositioningTable ( gdef, extractLookups(), subtables );