public void includeFont(Font font,CharTable charTable,String name) throws IOException {
  unicode=null;
  charName=null;
  this.font=font;
  this.charTable=charTable;
  this.fontName=name;
  this.fontBBox=font.getMaxCharBounds(context);
  this.noDefinedChars=0;
  this.unicode=new char[256];
  this.charName=new String[256];
  for (int i=0; i < unicode.length; i++) {
    charName[i]=charTable.toName(i);
    if (charName[i] != null) {
      unicode[i]=charTable.toUnicode(charName[i]);
      noDefinedChars++;
    }
 else {
      unicode[i]=0;
    }
  }
  openIncludeFont();
  writeEncoding(charTable);
  closeIncludeFont();
}

public void includeFont ( Font font , CharTable charTable , String name ) throws IOException { unicode = null ; charName = null ; this . font = font ; this . charTable = charTable ; this . fontName = name ; this . fontBBox = font . getMaxCharBounds ( context ) ; this . noDefinedChars = 0 ; this . unicode = new char [ 256 ] ; this . charName = new String [ 256 ] ; for ( int i = 0 ; i < unicode . length ; i ++ ) { charName [ i ] = charTable . toName ( i ) ; if ( charName [ i ] != null ) { unicode [ i ] = charTable . toUnicode ( charName [ i ] ) ; noDefinedChars ++ ; } else { unicode [ i ] = 0 ; } } openIncludeFont ( ) ; writeEncoding ( charTable ) ; closeIncludeFont ( ) ; }
embed this font to the file .
