public String fontReference(Font font,boolean embed,String embedAs){
  font=substituteFont(font);
  String key=getKey(font);
  Entry e=(Entry)table.get(key);
  if (e == null) {
    e=new Entry(font,getEncodingTable(font));
    try {
      firstRequest(e,embed,embedAs);
    }
 catch (    IOException exc) {
      exc.printStackTrace();
    }
    table.put(key,e);
  }
  return e.ref;
}

public String fontReference ( Font font , boolean embed , String embedAs ) { font = substituteFont ( font ) ; String key = getKey ( font ) ; Entry e = ( Entry ) table . get ( key ) ; if ( e == null ) { e = new Entry ( font , getEncodingTable ( font ) ) ; try { firstRequest ( e , embed , embedAs ) ; } catch ( IOException exc ) { exc . printStackTrace ( ) ; } table . put ( key , e ) ; } return e . ref ; }
returns a name for this font that can be used in the document . a new name is generated if the font was not used yet . for different fontsizes the same name is returned .
