// read the afm
AFMParser parser = new AFMParser(afm);
parser.parse();
metric = parser.getResult();
setEncoding(afmToDictionary(new AFMEncoding(metric)));
// set the values
setBaseFont(metric.getFontName());
fd.setFontName(metric.getFontName());
fd.setFontFamily(metric.getFamilyName());