TTFReader.main(args);
assertTrue(metricsFile.isFile());
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent ua = fopFactory.newFOUserAgent();
PDFRenderer renderer = new PDFRenderer();
renderer.setUserAgent(ua);
List fontList = new java.util.ArrayList();
List triplets = new java.util.ArrayList();
triplets.add(new FontTriplet(fontFamily, "normal", Font.WEIGHT_NORMAL));
EmbedFontInfo font = new EmbedFontInfo(
metricsFile.toURI().toASCIIString(),
true, triplets,
ttfFile.toURI().toASCIIString(), null);
fontList.add(font);
renderer.addFontList(fontList);
ua.setRendererOverride(renderer);
OutputStream out = new NullOutputStream();
Fop fop = fopFactory.newFop(null, ua, out);