xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Neu" <peter....@gmx.net>
Subject AW: Setting configuration of fonts in java code?
Date Fri, 01 Sep 2006 08:49:33 GMT
Hello,

I'm working my way through the src code of FOP in order to find a way
to configure the font setup in the java code. But this seems rather
difficult. The org.apache.fop.configuration.FontInfo object gives me the
possibility to insert the font names and stuff but I cannot insert the
metric file directly because only the path is taken there. 

Is there a way to do this ?

URL url = new URL("http://localhost:90/nbw06/xml/ttfcm.xml");
conn = url.openConnection();
metricFile = conn.getInputStream();
URL url2 = new URL2("http://localhost:90/nbw06/xml/verdana.ttf");
Conn2 = url.openConnection();
embedFile= conn2.getInputStream();

FontTriplet fontTrip1 = new FontTriplet("Verdana","normal","bold");
FontTriplet fontTrip2 = new FontTriplet("Verdana","normal","normal");
LinkedList l = new LinkedList();
l.add(fontTrip1);
l.add(fontTrip2);

FontInfo fontInf = new FontInfo("Verdana", metricFile ,false,l, embedFile);

//And Notify FOP of additional font ??


Cheers,
Pete





---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message