public static String addTTDir(final String fontPath,String failed){
  checkFontTablesInitialised();
  final File currentDir=new File(fontPath);
  if ((currentDir.exists()) && (currentDir.isDirectory())) {
    final String[] files=currentDir.list();
    if (files != null) {
      for (      final String currentFont : files) {
        addFontFile(currentFont,fontPath);
      }
    }
  }
 else {
    if (failed == null) {
      failed=fontPath;
    }
 else {
      failed=failed + ',' + fontPath;
    }
  }
  return failed;
}

public static String addTTDir ( final String fontPath , String failed ) { checkFontTablesInitialised ( ) ; final File currentDir = new File ( fontPath ) ; if ( ( currentDir . exists ( ) ) && ( currentDir . isDirectory ( ) ) ) { final String [ ] files = currentDir . list ( ) ; if ( files != null ) { for ( final String currentFont : files ) { addFontFile ( currentFont , fontPath ) ; } } } else { if ( failed == null ) { failed = fontPath ; } else { failed = failed + ',' + fontPath ; } } return failed ; }
add a truetype font directory and contents to substitution
