Hi all,
I wish to add a font via java rather than a configuration file.
I have tried the below code.  How do I include the metrics info?
Does anyone know how to add a font without using the "setUserConfig(<File>)" 
method?

            FopFactory fopFactory = FopFactory.newInstance();
            FOUserAgent userAgent = fopFactory.newFOUserAgent();

            PDFRenderer pdfrenderer = new PDFRenderer();
            pdfrenderer.setUserAgent(userAgent);
            FontInfo fontinfo = new FontInfo();
            fontinfo.addFontProperties("Wingdings","Wingdings","normal", 
Font.NORMAL);
            pdfrenderer.setupFontInfo(fontinfo);
            userAgent.setRendererOverride(pdfrenderer);

            out = new java.io.FileOutputStream(fopOutputDir + fileRoot + 
".pdf");
            out = new java.io.BufferedOutputStream(out);
            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out);

            Source xsltSrc = new StreamSource(fopDirectory + xslName);
            TransformerFactory transformerFactory = 
TransformerFactory.newInstance();
            Transformer transformer = 
transformerFactory.newTransformer(xsltSrc);

Cheers,
Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to