code: public int insertDirectory(String dir) {
          File file = new File(dir);
          if (!file.exists() || !file.isDirectory())
              return 0;
          File files[] = file.listFiles();
          if (files == null)
          	return 0;
          int count = 0;
          for (int k = 0; k < files.length; ++k) {
              file = files[k];
              String name = file.getPath().toLowerCase();
              try {
                  if (name.endsWith(".ttf") || name.endsWith(".otf") || name.endsWith(".afm")) {
                      Object allNames[] = BaseFont.getAllFontNames(file.getPath(), BaseFont.CP1252, null);
                      insertNames(allNames, file.getPath());
                      ++count;
                  }
                  else if (name.endsWith(".ttc")) {
                      String ttcs[] = BaseFont.enumerateTTCNames(file.getPath());
                      for (int j = 0; j < ttcs.length; ++j) {
                          String nt = file.getPath() + "," + j;
                          Object allNames[] = BaseFont.getAllFontNames(nt, BaseFont.CP1252, null);
                          insertNames(allNames, nt);
                      }
                      ++count;
                  }
              }
              catch (Exception e) {
              }
          }
          return count;
      }
docs: Inserts all the fonts recognized by iText in the
  <CODE>directory</CODE> into the map. The encoding
  will be <CODE>BaseFont.CP1252</CODE> but can be
  changed later.
  @param dir the directory to scan
  @return the number of files processed