fd = new PDFontDescriptorDictionary();
setFontDescriptor(fd);
// read the pfb
PfbParser pfbparser = new PfbParser(pfb);
pfb.close();
PDStream fontStream = new PDStream(doc, pfbparser.getInputStream(),
false);
fontStream.getStream().setInt("Length", pfbparser.size());
for (int i = 0; i < pfbparser.getLengths().length; i++)
{
fontStream.getStream().setInt("Length" + (i + 1),
pfbparser.getLengths()[i]);
}
fontStream.addCompression();
fd.setFontFile(fontStream);
// read the afm