On 12/6/01 3:03:54 AM, Richard Francken wrote:
>HI,
>
>I'm now develop the letters
>the WFM project. For testing
>the command line command I'm
>using the FOP.
>
>The problem is that it not
>support the Univers True Type
>Fond.
Hi, Richard!
It is easy enough to add custom true type fonts support to FOP, if you just use FOP from Apache. Following Apache instruction
you should run this command for each font file:
java org.apache.fop.fonts.apps.TTFReader C:\Winnt\Fonts\univer.ttf C:\Winnt\Fonts\univer.xml
(This assumes you have Java VM installed and file fop.jar is in your CLASSPATH environment variable.)
Then you should edit your userconfig.xml file in FOP_Dir\conf. Add this lines between <fonts> and </fonts> tags (don't forget to uncomment this block):
<font metrics-file="file:///C:/WINNT/Fonts/univer.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univer.ttf">
<font-triplet name="Univers" style="normal" weight="normal"/>
</font>
<font metrics-file="file:///C:/WINNT/Fonts/univerb.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univerb.ttf">
That's all. Now when you invoke FOP do it
as:
java org.apache.fop.apps.FOP -c FOP_Dir\conf\userconfig.xml some.fo some.pdf
But the problem do arise when you try to use this within Stylus Studio. I didn't managed to use FOP as custom post-processor with options needed. So I was forced to use FOP as Stylus Studio plugin. But I slightly changed the source file from FOP_Dir\src\org\apache\fop\apps\CommandLineOptions.java by including line:
userConfigFile = new File("Fop_Dir/conf/userconfig.xml");
then recompiled all sources (all you need to do just run the FOP_Dir\build.bat) and change file
Stylus Studio\bin\Plugins\Fop\fop.jar into new fop.jar I built.
Sorry if it looks a bit messy. But maybe someone will propose more comfortable way to use custom fonts in FOP within Stylus Studio.
Mike Smirnov