code: public static String[][] getFullFontName(String name, String encoding, byte ttfAfm[]) throws DocumentException, IOException {
          String nameBase = getBaseName(name);
          BaseFont fontBuilt = null;
          if (nameBase.toLowerCase().endsWith(".ttf") || nameBase.toLowerCase().endsWith(".otf") || nameBase.toLowerCase().indexOf(".ttc,") > 0)
              fontBuilt = new TrueTypeFont(name, CP1252, false, ttfAfm, true, false);
          else
              fontBuilt = createFont(name, encoding, false, false, ttfAfm, null);
          return fontBuilt.getFullFontName();
      }
docs: Gets the full name of the font. If it is a True Type font
  each array element will have {Platform ID, Platform Encoding ID,
  Language ID, font name}. The interpretation of this values can be
  found in the Open Type specification, chapter 2, in the 'name' table.<br>
  For the other fonts the array has a single element with {"", "", "",
  font name}.
  @param name the name of the font
  @param encoding the encoding of the font
  @param ttfAfm the true type font or the afm in a byte array
  @throws DocumentException on error
  @throws IOException on error
  @return the full name of the font