// Read fontdata
try {
if (subType == org.apache.fop.pdf.PDFFont.TYPE1) {
PFBParser parser = new PFBParser();
PFBData pfb = parser.parsePFB(instream);
embeddedFont = new PDFT1Stream(i);
((PDFT1Stream)embeddedFont).setData(pfb);
} else {
byte[] file = IOUtil.toByteArray(instream, 128000);
embeddedFont = new PDFTTFStream(i, file.length);
((PDFTTFStream)embeddedFont).setData(file, file.length);