protected void BuildSubrUsed(int Font,int FD,int SubrOffset,int[] SubrsOffsets,Map<Integer,int[]> hSubr,List<Integer> lSubr){
  int LBias=CalcBias(SubrOffset,Font);
  for (int i=0; i < glyphsInList.size(); i++) {
    int glyph=(int)glyphsInList.get(i);
    int Start=fonts[Font].charstringsOffsets[glyph];
    int End=fonts[Font].charstringsOffsets[glyph + 1];
    if (FD >= 0) {
      EmptyStack();
      NumOfHints=0;
      int GlyphFD=fonts[Font].FDSelect[glyph];
      if (GlyphFD == FD)       ReadASubr(Start,End,GBias,LBias,hSubr,lSubr,SubrsOffsets);
    }
 else     ReadASubr(Start,End,GBias,LBias,hSubr,lSubr,SubrsOffsets);
  }
  for (int i=0; i < lSubr.size(); i++) {
    int Subr=(int)lSubr.get(i);
    if (Subr < SubrsOffsets.length - 1 && Subr >= 0) {
      int Start=SubrsOffsets[Subr];
      int End=SubrsOffsets[Subr + 1];
      ReadASubr(Start,End,GBias,LBias,hSubr,lSubr,SubrsOffsets);
    }
  }
}

protected void BuildSubrUsed ( int Font , int FD , int SubrOffset , int [ ] SubrsOffsets , Map < Integer , int [ ] > hSubr , List < Integer > lSubr ) { int LBias = CalcBias ( SubrOffset , Font ) ; for ( int i = 0 ; i < glyphsInList . size ( ) ; i ++ ) { int glyph = ( int ) glyphsInList . get ( i ) ; int Start = fonts [ Font ] . charstringsOffsets [ glyph ] ; int End = fonts [ Font ] . charstringsOffsets [ glyph + 1 ] ; if ( FD >= 0 ) { EmptyStack ( ) ; NumOfHints = 0 ; int GlyphFD = fonts [ Font ] . FDSelect [ glyph ] ; if ( GlyphFD == FD ) ReadASubr ( Start , End , GBias , LBias , hSubr , lSubr , SubrsOffsets ) ; } else ReadASubr ( Start , End , GBias , LBias , hSubr , lSubr , SubrsOffsets ) ; } for ( int i = 0 ; i < lSubr . size ( ) ; i ++ ) { int Subr = ( int ) lSubr . get ( i ) ; if ( Subr < SubrsOffsets . length - 1 && Subr >= 0 ) { int Start = SubrsOffsets [ Subr ] ; int End = SubrsOffsets [ Subr + 1 ] ; ReadASubr ( Start , End , GBias , LBias , hSubr , lSubr , SubrsOffsets ) ; } } }
function uses readasubr on the glyph used to build the lsubr & gsubr map . the map ( of the lsubr only ) is then scanned recursively for lsubr & gsubrs calls .
